Yocto 2.3

Move OpenBMC to Yocto 2.3(pyro).

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
diff --git a/import-layers/meta-virtualization/classes/go-osarchmap.bbclass b/import-layers/meta-virtualization/classes/go-osarchmap.bbclass
deleted file mode 100644
index 4e00c7b..0000000
--- a/import-layers/meta-virtualization/classes/go-osarchmap.bbclass
+++ /dev/null
@@ -1,38 +0,0 @@
-BUILD_GOOS = "${@go_map_os(d.getVar('BUILD_OS', True), d)}"
-BUILD_GOARCH = "${@go_map_arch(d.getVar('BUILD_ARCH', True), d)}"
-BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}"
-HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS', True), d)}"
-HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH', True), d)}"
-HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH', True), d.getVar('TUNE_FEATURES', True), d)}"
-HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
-TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS', True), d)}"
-TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH', True), d)}"
-TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH', True), d.getVar('TUNE_FEATURES', True), d)}"
-TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
-GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE',True) == d.getVar('HOST_GOTUPLE',True)]}"
-
-def go_map_arch(a, d):
-    import re
-    if re.match('i.86', a):
-        return '386'
-    elif a == 'x86_64':
-        return 'amd64'
-    elif re.match('arm.*', a):
-        return 'arm'
-    elif re.match('aarch64.*', a):
-        return 'arm64'
-    elif re.match('p(pc|owerpc)(|64)', a):
-        return 'powerpc'
-    else:
-        bb.error("cannot map '%s' to a Go architecture" % a)
-
-def go_map_arm(a, f, d):
-    import re
-    if re.match('arm.*', a) and re.match('arm.*7.*', f):
-        return '7'
-    return ''
-
-def go_map_os(o, d):
-    if o.startswith('linux'):
-        return 'linux'
-    return o
diff --git a/import-layers/meta-virtualization/conf/layer.conf b/import-layers/meta-virtualization/conf/layer.conf
index f5c1b1e..be08a98 100644
--- a/import-layers/meta-virtualization/conf/layer.conf
+++ b/import-layers/meta-virtualization/conf/layer.conf
@@ -19,3 +19,6 @@
 
 # Override security flags
 require conf/distro/include/virt_security_flags.inc
+
+PREFERRED_PROVIDER_virtual/runc ?= "runc-docker"
+PREFERRED_PROVIDER_virtual/containerd ?= "containerd-docker"
diff --git a/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb b/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb
index b3af6f4..065d0ea 100644
--- a/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb
+++ b/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb
@@ -9,6 +9,7 @@
 SRC_URI[md5sum] = "b20976194ee8fdb61e6b55281fb6ead4"
 SRC_URI[sha256sum] = "a79ab9ae6fb3ff3ce0aa5539b055c0379eaffdc6c5f003af4010fcea683c1a45"
 
+inherit allarch
 inherit update-rc.d
 
 INITSCRIPT_NAME = "cgroups-init"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd-docker_git.bb b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-docker_git.bb
new file mode 100644
index 0000000..f6dcaec
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-docker_git.bb
@@ -0,0 +1,10 @@
+include containerd.inc
+
+SRCREV = "03e5862ec0d8d3b3f750e19fca3ee367e13c090e"
+SRC_URI = "\
+	git://github.com/docker/containerd.git;branch=docker-1.13.x \
+	"
+CONTAINERD_VERSION = "0.2.3"
+
+PROVIDES += "virtual/containerd"
+RPROVIDES_${PN} = "virtual/containerd"
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
new file mode 100644
index 0000000..37f8547
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb
@@ -0,0 +1,9 @@
+include containerd.inc
+
+SRCREV = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
+SRC_URI = "git://github.com/docker/containerd.git;nobranch=1 \
+          "
+CONTAINERD_VERSION = "0.2.2"
+
+PROVIDES += "virtual/containerd"
+RPROVIDES_${PN} = "virtual/containerd"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd_git.bb b/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
similarity index 92%
rename from import-layers/meta-virtualization/recipes-containers/containerd/containerd_git.bb
rename to import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
index c2000b1..b143979 100644
--- a/import-layers/meta-virtualization/recipes-containers/containerd/containerd_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
@@ -4,22 +4,15 @@
                containerd leverages runC's advanced features such as seccomp and user namespace \
                support as well as checkpoint and restore for cloning and live migration of containers."
 
-SRCREV = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
-SRC_URI = "\
-	git://github.com/docker/containerd.git;nobranch=1 \
-	"
-
 # Apache-2.0 for containerd
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
 
 S = "${WORKDIR}/git"
 
-CONTAINERD_VERSION = "0.2.2"
 PV = "${CONTAINERD_VERSION}+git${SRCREV}"
 
-DEPENDS = "go-cross \
-    "
+inherit go
 
 RRECOMMENDS_${PN} = "lxc docker"
 CONTAINERD_PKG="github.com/docker/containerd"
@@ -47,6 +40,7 @@
 	mkdir -p .gopath/src/"$(dirname "${CONTAINERD_PKG}")"
 	ln -sf ../../../.. .gopath/src/"${CONTAINERD_PKG}"
 	export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
 	cd -
 
 	# Pass the needed cflags/ldflags so that cgo
@@ -86,6 +80,6 @@
 	fi
 }
 
-FILES_${PN} += "/lib/systemd/system/*"
+FILES_${PN} += "${systemd_system_unitdir}/*"
 
 INHIBIT_PACKAGE_STRIP = "1"
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 dc0bdbe..21dee2b 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
@@ -22,11 +22,12 @@
            file://0002-criu-Skip-documentation-install.patch \
            file://0001-criu-Change-libraries-install-directory.patch \
            ${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \
+           file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
           "
 
 COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
 
-DEPENDS += "libnl libcap protobuf-c-native protobuf-c"
+DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native"
 
 S = "${WORKDIR}/git"
 
@@ -67,6 +68,7 @@
 }
 
 do_install () {
+    export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
     oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
 }
 
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch
index da881dd..5d5d035 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch
@@ -1,3 +1,8 @@
+From bd2eeaddfc1f12f87184d870cc9a1adde1cf0b10 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Mon, 24 Apr 2017 13:08:48 -0400
+Subject: [PATCH] criu/Makefile.config: explicitly remove selinux support
+
 Upstream-Status: Inappropriate [disable feature]
 
 It shows warning when build crius if libselinux has been built already:
@@ -7,20 +12,28 @@
 Apply this patch to disable selinux support when 'selinux' is not in PACKAGECONF.
 
 Signed-off-by: Kai Kang <kai.kang@windriver.com>
+[MA: Context updated to apply against criu v2.5]
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ criu/Makefile.config | 5 -----
+ 1 file changed, 5 deletions(-)
 
-diff --git a/Makefile.config b/Makefile.config
-index ce4b8d8..3ac2780 100644
---- a/Makefile.config
-+++ b/Makefile.config
-@@ -8,11 +8,6 @@ ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y)
- 	DEFINES += -DCONFIG_HAS_LIBBSD
+diff --git a/criu/Makefile.config b/criu/Makefile.config
+index f531b3b..37216f8 100644
+--- a/criu/Makefile.config
++++ b/criu/Makefile.config
+@@ -7,11 +7,6 @@ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
+         FEATURE_DEFINES	+= -DCONFIG_HAS_LIBBSD
  endif
  
 -ifeq ($(call pkg-config-check,libselinux),y)
--	LIBS := -lselinux $(LIBS)
--	DEFINES += -DCONFIG_HAS_SELINUX
+-        LIBS		+= -lselinux
+-        FEATURE_DEFINES	+= -DCONFIG_HAS_SELINUX
 -endif
 -
- $(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h
- 	$(E) "  GEN     " $@
- 	$(Q) @echo '#ifndef __CR_CONFIG_H__' > $@
+ export DEFINES += $(FEATURE_DEFINES)
+ export CFLAGS += $(FEATURE_DEFINES)
+ 
+-- 
+2.7.4
+
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
new file mode 100644
index 0000000..8bda8c4
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
@@ -0,0 +1,30 @@
+From 2e0c5c66786016f6443da2c1ff15ad77f018ec9b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Mon, 24 Apr 2017 16:12:05 -0400
+Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
+
+I am not sure why Yocto installs python modules in arch specific
+/usr/libXX directories but it does. Allow the recipe to pass this via
+INSTALL_LIB.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ lib/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index f1c0821..c714d12 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -56,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
+ 	$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
+ 	$(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
+ 	$(E) "  INSTALL " crit
+-	$(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
++	$(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(INSTALL_LIB)
+ .PHONY: install
+ 
+ uninstall:
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-distribution/docker-distribution_git.bb b/import-layers/meta-virtualization/recipes-containers/docker-distribution/docker-distribution_git.bb
new file mode 100644
index 0000000..08b6d70
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -0,0 +1,64 @@
+HOMEPAGE = "http://github.com/docker/distribution"
+SUMMARY = "The Docker toolset to pack, ship, store, and deliver content"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRCREV_distribution="0810eba2adf048b77621472991211924d9ec31c5"
+SRC_URI = "git://github.com/docker/distribution.git;branch=master;name=distribution;destsuffix=git/src/github.com/docker/distribution \
+           file://docker-registry.service \
+          "
+
+PACKAGES =+ "docker-registry"
+
+PV = "v2.6.0-rc+git${SRCPV}"
+S = "${WORKDIR}/git/src/github.com/docker/distribution"
+
+inherit goarch
+inherit go
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package. 
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+	export GOARCH="${TARGET_GOARCH}"
+	export GOPATH="${WORKDIR}/git/"
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	export CGO_ENABLED="1"
+	export CFLAGS=""
+	export LDFLAGS=""
+	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	export GO_GCFLAGS=""
+	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+	oe_runmake binaries
+}
+
+do_install() {
+	install -d ${D}/${sbindir}
+	install ${S}/bin/registry ${D}/${sbindir}
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+	    install -d ${D}${systemd_unitdir}/system
+	    install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
+	fi
+
+	install -d ${D}/${sysconfdir}/docker-distribution/registry/
+	install ${S}/cmd/registry/config-example.yml ${D}/${sysconfdir}/docker-distribution/registry/config.yml
+
+	# storage for the registry containers
+	install -d ${D}/${localstatedir}/lib/registry/
+}
+
+INSANE_SKIP_${PN} += "ldflags already-stripped"
+INSANE_SKIP_docker-registry += "ldflags already-stripped"
+
+FILES_docker-registry = "${sbindir}/*"
+FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
+FILES_docker-registry += "${sysconfdir}/docker-distribution/*"
+FILES_docker-registry += "${localstatedir}/lib/registry/"
+
+SYSTEMD_SERVICE_docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
+SYSTEMD_AUTO_ENABLE_docker-registry = "enable"
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-distribution/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker-distribution/files/docker-registry.service
new file mode 100644
index 0000000..15460c7
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker-distribution/files/docker-registry.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=v2 Registry server for Docker
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/registry serve /etc/docker-distribution/registry/config.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/docker-registry_git.bb b/import-layers/meta-virtualization/recipes-containers/docker-registry/docker-registry_git.bb
deleted file mode 100644
index e94e985..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/docker-registry_git.bb
+++ /dev/null
@@ -1,93 +0,0 @@
-HOMEPAGE = "https://github.com/docker/docker-registry"
-SUMMARY = "Registry server for Docker"
-DESCRIPTION = "\
- This is the classic python docker-registry. \
- . \
- hosting/delivering of repositories and images \
- "
-
-SRCREV = "fd8c0c114985547b69088e0f1526e58bfe2ff914"
-SRC_URI = "\
-	git://github.com/docker/docker-registry.git \
-	file://docker-registry.conf \
-	file://docker-registry.service \
-	file://config.yml \
-	file://change_sqlalchemy_rqt.patch \
-	"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=35e8e5305c1b7b4a5761f9de5d44e5f4"
-
-S = "${WORKDIR}/git"
-
-PV = "0.9.1+git${SRCREV}"
-
-RDEPENDS_${PN} += "\
-  docker \
-  gunicorn (>= 19.1.1) \
-  python-pip \
-  python-distribute \
-  python-m2crypto (>= 0.22.3) \
-  python-pyyaml (>= 3.11) \
-  python-flask (>= 0.10.1) \
-  python-gevent (>= 1.0.1) \
-  python-requests \
-  python-sqlalchemy (>= 0.9.4) \
-  python-blinker (>= 1.3) \
-  python-backports-lzma (>= 0.0.3) \
-  python-flask-cors (>= 1.10.3) \
-  python-bugsnag (>= 2.0.2) \
-  python-docker-registry-core (>= 2.0.3) \
-  python-newrelic (>= 2.22.0.19) \
-  python-itsdangerous (>= 0.21) \
-  python-jinja2 (>= 2.4) \
-  python-werkzeug (>= 0.7) \
-  python-simplejson (>= 3.6.2) \
-  python-redis (>= 2.10.3) \
-  python-boto (>= 2.34.0) \
-  python-webob \
-  "
-# OFFICIAL REQ:
-# docker-registry-core>=2,<3
-# blinker==1.3
-# backports.lzma==0.0.3,!=0.0.4
-
-# Flask==0.10.1
-# gevent==1.0.1
-# gunicorn==19.1.1
-# PyYAML==3.11
-# requests==2.3.0
-# M2Crypto==0.22.3
-# sqlalchemy==0.9.4
-# setuptools==5.8
-# 
-# [bugsnag]
-# bugsnag>=2.0,<2.1
-# 
-# [cors]
-# Flask-cors>=1.8,<2.0
-# 
-# [newrelic]
-# newrelic>=2.22,<2.23
-
-
-inherit setuptools systemd
-
-SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
-
-do_install_append() {
-	mkdir -p ${D}/etc/default/
-	cp ${WORKDIR}/docker-registry.conf ${D}/etc/default/docker-registry
-
-	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-		install -d ${D}${systemd_unitdir}/system
-		install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
-		sed -i "s|#WORKDIR#|${PYTHON_SITEPACKAGES_DIR}/docker_registry|" ${D}/${systemd_unitdir}/system/docker-registry.service
-	fi
-	# based on config_mirror.yml - uses /var/docker-registry instead of /tmp for files
-	install ${WORKDIR}/config.yml ${D}/etc/docker-registry.yml
-	mkdir -p ${D}/var/docker-registry
-}
-
-FILES_${PN} += "/etc/default /var/docker-registry /etc/ /etc/default/volatiles"
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/change_sqlalchemy_rqt.patch b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/change_sqlalchemy_rqt.patch
deleted file mode 100644
index 75cbd6d..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/change_sqlalchemy_rqt.patch
+++ /dev/null
@@ -1,13 +0,0 @@
----
- requirements/main.txt |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/requirements/main.txt
-+++ b/requirements/main.txt
-@@ -5,5 +5,5 @@
- PyYAML==3.11
- requests==2.3.0
- M2Crypto==0.22.3
--sqlalchemy==0.9.4
-+sqlalchemy>=0.9.4
- setuptools==5.8
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/config.yml b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/config.yml
deleted file mode 100644
index 8b33766..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/config.yml
+++ /dev/null
@@ -1,228 +0,0 @@
-# All other flavors inherit the `common' config snippet
-common: &common
-    issue: '"docker-registry server"'
-    # Default log level is info
-    loglevel: _env:LOGLEVEL:info
-    # Enable debugging (additional informations in the output of the _ping endpoint)
-    debug: _env:DEBUG:false
-    # By default, the registry acts standalone (eg: doesn't query the index)
-    standalone: _env:STANDALONE:true
-    # The default endpoint to use (if NOT standalone) is index.docker.io
-    index_endpoint: _env:INDEX_ENDPOINT:https://index.docker.io
-    # Storage redirect is disabled
-    storage_redirect: _env:STORAGE_REDIRECT
-    # Token auth is enabled (if NOT standalone)
-    disable_token_auth: _env:DISABLE_TOKEN_AUTH
-    # No priv key
-    privileged_key: _env:PRIVILEGED_KEY
-    # No search backend
-    search_backend: _env:SEARCH_BACKEND
-    # SQLite search backend
-    sqlalchemy_index_database: _env:SQLALCHEMY_INDEX_DATABASE:sqlite:////var/docker-registry/docker-registry.db
-
-    # Mirroring is not enabled
-    mirroring:
-        source: _env:MIRROR_SOURCE # https://registry-1.docker.io
-        source_index: _env:MIRROR_SOURCE_INDEX # https://index.docker.io
-        tags_cache_ttl: _env:MIRROR_TAGS_CACHE_TTL:172800 # seconds
-
-    cache:
-        host: _env:CACHE_REDIS_HOST
-        port: _env:CACHE_REDIS_PORT
-        db: _env:CACHE_REDIS_DB:0
-        password: _env:CACHE_REDIS_PASSWORD
-
-    # Enabling LRU cache for small files
-    # This speeds up read/write on small files
-    # when using a remote storage backend (like S3).
-    cache_lru:
-        host: _env:CACHE_LRU_REDIS_HOST
-        port: _env:CACHE_LRU_REDIS_PORT
-        db: _env:CACHE_LRU_REDIS_DB:0
-        password: _env:CACHE_LRU_REDIS_PASSWORD
-
-    # Enabling these options makes the Registry send an email on each code Exception
-    email_exceptions:
-        smtp_host: _env:SMTP_HOST
-        smtp_port: _env:SMTP_PORT:25
-        smtp_login: _env:SMTP_LOGIN
-        smtp_password: _env:SMTP_PASSWORD
-        smtp_secure: _env:SMTP_SECURE:false
-        from_addr: _env:SMTP_FROM_ADDR:docker-registry@localdomain.local
-        to_addr: _env:SMTP_TO_ADDR:noise+dockerregistry@localdomain.local
-
-    # Enable bugsnag (set the API key)
-    bugsnag: _env:BUGSNAG
-
-    # CORS support is not enabled by default
-    cors:
-        origins: _env:CORS_ORIGINS
-        methods: _env:CORS_METHODS
-        headers: _env:CORS_HEADERS:[Content-Type]
-        expose_headers: _env:CORS_EXPOSE_HEADERS
-        supports_credentials: _env:CORS_SUPPORTS_CREDENTIALS
-        max_age: _env:CORS_MAX_AGE
-        send_wildcard: _env:CORS_SEND_WILDCARD
-        always_send: _env:CORS_ALWAYS_SEND
-        automatic_options: _env:CORS_AUTOMATIC_OPTIONS
-        vary_header: _env:CORS_VARY_HEADER
-        resources: _env:CORS_RESOURCES
-
-local: &local
-    <<: *common
-    storage: local
-    storage_path: _env:STORAGE_PATH:/var/docker-registry
-
-
-s3: &s3
-    <<: *common
-    storage: s3
-    s3_region: _env:AWS_REGION
-    s3_bucket: _env:AWS_BUCKET
-    boto_bucket: _env:AWS_BUCKET
-    storage_path: _env:STORAGE_PATH:/registry
-    s3_encrypt: _env:AWS_ENCRYPT:true
-    s3_secure: _env:AWS_SECURE:true
-    s3_access_key: _env:AWS_KEY
-    s3_secret_key: _env:AWS_SECRET
-    s3_use_sigv4: _env:AWS_USE_SIGV4
-    boto_host: _env:AWS_HOST
-    boto_port: _env:AWS_PORT
-    boto_calling_format: _env:AWS_CALLING_FORMAT
-
-cloudfronts3: &cloudfronts3
-    <<: *s3
-    cloudfront:
-        base: _env:CF_BASE_URL
-        keyid: _env:CF_KEYID
-        keysecret: _env:CF_KEYSECRET
-
-azureblob: &azureblob
-    <<: *common
-    storage: azureblob
-    azure_storage_account_name: _env:AZURE_STORAGE_ACCOUNT_NAME
-    azure_storage_account_key: _env:AZURE_STORAGE_ACCOUNT_KEY
-    azure_storage_container: _env:AZURE_STORAGE_CONTAINER:registry
-    azure_use_https: _env:AZURE_USE_HTTPS:true
-
-# Ceph Object Gateway Configuration
-# See http://ceph.com/docs/master/radosgw/ for details on installing this service.
-ceph-s3: &ceph-s3
-    <<: *common
-    storage: s3
-    s3_region: ~
-    s3_bucket: _env:AWS_BUCKET
-    s3_encrypt: _env:AWS_ENCRYPT:false
-    s3_secure: _env:AWS_SECURE:false
-    storage_path: _env:STORAGE_PATH:/registry
-    s3_access_key: _env:AWS_KEY
-    s3_secret_key: _env:AWS_SECRET
-    boto_bucket: _env:AWS_BUCKET
-    boto_host: _env:AWS_HOST
-    boto_port: _env:AWS_PORT
-    boto_debug: _env:AWS_DEBUG:0
-    boto_calling_format: _env:AWS_CALLING_FORMAT
-
-# Google Cloud Storage Configuration
-# See:
-# https://developers.google.com/storage/docs/reference/v1/getting-startedv1#keys
-# for details on access and secret keys.
-gcs:
-    <<: *common
-    storage: gcs
-    boto_bucket: _env:GCS_BUCKET
-    storage_path: _env:STORAGE_PATH:/registry
-    gs_secure: _env:GCS_SECURE:true
-    gs_access_key: _env:GCS_KEY
-    gs_secret_key: _env:GCS_SECRET
-    # OAuth 2.0 authentication with the storage.
-    # oauth2 can be set to true or false. If it is set to true, gs_access_key,
-    # gs_secret_key and gs_secure are not needed.
-    # Client ID and Client Secret must be set into OAUTH2_CLIENT_ID and
-    # OAUTH2_CLIENT_SECRET environment variables.
-    # See: https://developers.google.com/accounts/docs/OAuth2.
-    oauth2: _env:GCS_OAUTH2:false
-
-# This flavor is for storing images in Openstack Swift
-swift: &swift
-    <<: *common
-    storage: swift
-    storage_path: _env:STORAGE_PATH:/registry
-    # keystone authorization
-    swift_authurl: _env:OS_AUTH_URL
-    swift_container: _env:OS_CONTAINER
-    swift_user: _env:OS_USERNAME
-    swift_password: _env:OS_PASSWORD
-    swift_tenant_name: _env:OS_TENANT_NAME
-    swift_region_name: _env:OS_REGION_NAME
-
-# This flavor stores the images in Glance (to integrate with openstack)
-# See also: https://github.com/docker/openstack-docker
-glance: &glance
-    <<: *common
-    storage: glance
-    storage_alternate: _env:GLANCE_STORAGE_ALTERNATE:file
-    storage_path: _env:STORAGE_PATH:/var/docker-registry
-
-openstack:
-    <<: *glance
-
-# This flavor stores the images in Glance (to integrate with openstack)
-# and tags in Swift.
-glance-swift: &glance-swift
-    <<: *swift
-    storage: glance
-    storage_alternate: swift
-
-openstack-swift:
-    <<: *glance-swift
-
-elliptics:
-    <<: *common
-    storage: elliptics
-    elliptics_nodes: _env:ELLIPTICS_NODES
-    elliptics_wait_timeout: _env:ELLIPTICS_WAIT_TIMEOUT:60
-    elliptics_check_timeout: _env:ELLIPTICS_CHECK_TIMEOUT:60
-    elliptics_io_thread_num: _env:ELLIPTICS_IO_THREAD_NUM:2
-    elliptics_net_thread_num: _env:ELLIPTICS_NET_THREAD_NUM:2
-    elliptics_nonblocking_io_thread_num: _env:ELLIPTICS_NONBLOCKING_IO_THREAD_NUM:2
-    elliptics_groups: _env:ELLIPTICS_GROUPS
-    elliptics_verbosity: _env:ELLIPTICS_VERBOSITY:4
-    elliptics_logfile: _env:ELLIPTICS_LOGFILE:/dev/stderr
-    elliptics_addr_family: _env:ELLIPTICS_ADDR_FAMILY:2
-
-# This flavor stores the images in Aliyun OSS
-# See:
-# https://i.aliyun.com/access_key/
-# for details on access and secret keys.
-oss: &oss
-    <<: *common
-    storage: oss
-    storage_path: _env:STORAGE_PATH:/registry/
-    oss_host: _env:OSS_HOST
-    oss_bucket: _env:OSS_BUCKET
-    oss_accessid: _env:OSS_KEY
-    oss_accesskey: _env:OSS_SECRET
-
-
-
-# This is the default configuration when no flavor is specified
-dev: &dev
-    <<: *local
-    loglevel: _env:LOGLEVEL:debug
-    debug: _env:DEBUG:true
-    search_backend: _env:SEARCH_BACKEND:sqlalchemy
-
-# This flavor is used by unit tests
-test:
-    <<: *dev
-    index_endpoint: https://registry-stage.hub.docker.com
-    standalone: true
-    storage_path: _env:STORAGE_PATH:./tmp/test
-
-# To specify another flavor, set the environment variable SETTINGS_FLAVOR
-# $ export SETTINGS_FLAVOR=prod
-prod:
-    <<: *s3
-    storage_path: _env:STORAGE_PATH:/prod
-
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.conf b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.conf
deleted file mode 100644
index 940ece1..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# The Docker registry configuration file
-DOCKER_REGISTRY_CONFIG=/etc/docker-registry.yml
-
-# The configuration to use from DOCKER_REGISTRY_CONFIG file
-SETTINGS_FLAVOR=local
-
-# Address to bind the registry to
-REGISTRY_ADDRESS=0.0.0.0
-
-# Port to bind the registry to
-REGISTRY_PORT=5000
-
-# Number of workers to handle the connections
-GUNICORN_WORKERS=4
-
-STANDALONE=true
-
-MIRROR_SOURCE=https://registry-1.docker.io
-MIRROR_SOURCE_INDEX=https://index.docker.io
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.service
deleted file mode 100644
index 4f4cfe7..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Registry server for Docker
-After=docker.service
-Requires=docker.service
-
-[Service]
-Type=simple
-Environment=DOCKER_REGISTRY_CONFIG=/etc/docker-registry.yml
-EnvironmentFile=-/etc/default/docker-registry
-WorkingDirectory=#WORKDIR#
-ExecStart=/usr/bin/gunicorn --access-logfile /var/log/docker-registry-access.log --error-logfile /var/log/docker-registry-error.log --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b ${REGISTRY_ADDRESS}:${REGISTRY_PORT} -w ${GUNICORN_WORKERS} docker_registry.wsgi:application
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
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 04dc76d..74170cb 100644
--- a/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
@@ -18,12 +18,14 @@
  subtle and/or glaring issues. \
  "
 
-SRCREV = "7392c3b0ce0f9d3e918a321c66668c5d1ef4f689"
+SRCREV_docker = "49bf474f9ed7ce7143a59d1964ff7b7fd9b52178"
+SRCREV_libnetwork="0f534354b813003a754606689722fe253101bc4e"
 SRC_URI = "\
-	git://github.com/docker/docker.git;nobranch=1 \
-	file://docker.service \
+	git://github.com/docker/docker.git;nobranch=1;name=docker \
+	git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
 	file://docker.init \
 	file://hi.Dockerfile \
+	file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
 	"
 
 # Apache-2.0 for docker
@@ -32,11 +34,10 @@
 
 S = "${WORKDIR}/git"
 
-DOCKER_VERSION = "1.12.5"
-PV = "${DOCKER_VERSION}+git${SRCREV}"
+DOCKER_VERSION = "1.13.0"
+PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
 
 DEPENDS = " \
-    go-cross \
     go-cli \
     go-pty \
     go-context \
@@ -50,45 +51,32 @@
     go-systemd \
     btrfs-tools \
     sqlite3 \
-    go-distribution-digest \
+    go-distribution \
+    compose-file \
+    go-connections \
+    notary \
+    grpc-go \
     "
 
-DEPENDS_append_class-target = "lvm2"
+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} += "containerd runc"
+RDEPENDS_${PN} += "virtual/containerd virtual/runc"
+
 RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat"
-RSUGGESTS_${PN} = "lxc docker-registry rt-tests"
+RSUGGESTS_${PN} = "lxc rt-tests"
 DOCKER_PKG="github.com/docker/docker"
 
+inherit systemd update-rc.d
+inherit go
+inherit goarch
+
 do_configure[noexec] = "1"
 
 do_compile() {
-	case "${TARGET_ARCH}" in
-		arm)
-			GOARCH=arm
-			case "${TUNE_PKGARCH}" in
-				cortexa*)
-					export GOARM=7
-				;;
-			esac
-		;;
-		aarch64)
-			GOARCH=arm64
-		;;
-		i586|i686)
-			GOARCH=386
-		;;
-		x86_64)
-			GOARCH=amd64
-		;;
-		*)
-			GOARCH="${TARGET_ARCH}"
-		;;
-	esac
-	export GOARCH
-
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
 	# docker to download its dependencies but rather
 	# use dependencies packaged independently.
@@ -96,6 +84,10 @@
 	rm -rf .gopath
 	mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
 	ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
+
+	mkdir -p .gopath/src/github.com/docker
+	ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork
+
 	export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
 	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
 	cd -
@@ -113,42 +105,50 @@
 	# to build this:
 	DOCKER_GITCOMMIT="${SRCREV}" \
 	  ./hack/make.sh dynbinary
-}
 
-inherit systemd update-rc.d
+	# build the proxy
+	go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy
+}
 
 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"
+INITSCRIPT_PARAMS_${PN} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
 
 do_install() {
 	mkdir -p ${D}/${bindir}
 	cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker
 	cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
-	cp ${S}/bundles/latest/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy
+	cp ${S}/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}/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 ${WORKDIR}/docker.service ${D}/${systemd_unitdir}/system
+		install -m 644 ${S}/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}/usr/share/docker/
-	cp ${WORKDIR}/hi.Dockerfile ${D}/usr/share/docker/
+	mkdir -p ${D}${datadir}/docker/
+	cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/
+	install -m 0755 ${S}/contrib/check-config.sh ${D}${datadir}/docker/
 }
 
 inherit useradd
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "-r docker"
 
-FILES_${PN} += "/lib/systemd/system/*"
+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/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
new file mode 100644
index 0000000..240b744
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
@@ -0,0 +1,116 @@
+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 +-
+ vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go     | 2 +-
+ vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/client/README.md b/client/README.md
+index 059dfb3..9de54aa 100644
+--- a/client/README.md
++++ b/client/README.md
+@@ -8,7 +8,7 @@ For example, to list running containers (the equivalent of `docker ps`):
+ package main
+ 
+ import (
+-	"context"
++	"golang.org/x/net/context"
+ 	"fmt"
+ 
+ 	"github.com/docker/docker/api/types"
+diff --git a/client/client.go b/client/client.go
+index a9bdab6..95933af 100644
+--- a/client/client.go
++++ b/client/client.go
+@@ -19,7 +19,7 @@ For example, to list running containers (the equivalent of "docker ps"):
+ 	package main
+ 
+ 	import (
+-		"context"
++		"golang.org/x/net/context"
+ 		"fmt"
+ 
+ 		"github.com/docker/docker/api/types"
+diff --git a/daemon/info_unix.go b/daemon/info_unix.go
+index 9c41c0e..57f8a7b 100644
+--- a/daemon/info_unix.go
++++ b/daemon/info_unix.go
+@@ -3,7 +3,7 @@
+ package daemon
+ 
+ import (
+-	"context"
++	"golang.org/x/net/context"
+ 	"os/exec"
+ 	"strings"
+ 
+diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
+index d43bf3a..e5802a7 100644
+--- a/integration-cli/docker_api_attach_test.go
++++ b/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"
+diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go
+index 22445e5..d0afc8c 100644
+--- a/integration-cli/docker_cli_save_load_unix_test.go
++++ b/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/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
+index 6b3295a..cbfcf7e 100644
+--- a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
++++ b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
+@@ -1,7 +1,7 @@
+ package logbroker
+ 
+ import (
+-	"context"
++	"golang.org/x/net/context"
+ 	"fmt"
+ 	"strings"
+ 	"sync"
+diff --git a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
+index 5a6c71a..efe5921 100644
+--- a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
++++ b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
+@@ -1,7 +1,7 @@
+ package storage
+ 
+ import (
+-	"context"
++	"golang.org/x/net/context"
+ 	"io"
+ 	"io/ioutil"
+ 	"os"
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service
new file mode 100644
index 0000000..7b4bc46
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=docker private registry service
+After=docker.service
+
+[Service]
+ExecStartPre=-/usr/bin/docker kill registry
+ExecStartPre=-/usr/bin/docker rm registry
+ExecStart=/usr/bin/docker run --name registry -v /mirror/registry:/tmp/ -p 5000:5000 \
+                          -e "STANDALONE=true" \
+                          -e "MIRROR_SOURCE=https://registry-1.docker.io" \
+                          -e "MIRROR_SOURCE_INDEX=https://index.docker.io" \
+                          -e "SETTINGS_FLAVOR=local" \
+                          registry
+ExecStop=-/usr/bin/docker stop registry
+Restart=always
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init b/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init
index 2e8eb9e..9c01c75 100644
--- a/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init
@@ -28,7 +28,6 @@
 pidfile="/var/run/$prog.pid"
 lockfile="/var/lock/subsys/$prog"
 logfile="/var/log/$prog"
-other_args="--registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs"
 
 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
@@ -39,8 +38,8 @@
 
     if ! [ -f $pidfile ]; then
         printf "Starting $prog:\t"
-        echo -e "\n$(date)\n" >> $logfile
-        "$unshare" -m -- $exec daemon $other_args &>> $logfile &
+        echo "\n$(date)\n" >> $logfile
+        "$unshare" -m -- $exec -d $other_args &>> $logfile &
         pid=$!
         touch $lockfile
         # wait up to 10 seconds for the pidfile to exist.  see
diff --git a/import-layers/meta-virtualization/recipes-containers/go-digest/go-digest_git.bb b/import-layers/meta-virtualization/recipes-containers/go-digest/go-digest_git.bb
new file mode 100644
index 0000000..a2f8cd6
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-digest/go-digest_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Common digest package used across the container ecosystem."
+HOMEPAGE = "https://github.com/opencontainers/go-digest.git"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE.code;md5=9cd86830b557232ce55e2a6b47387471"
+
+SRCNAME = "go-digest"
+
+PKG_NAME = "github.com/opencontainers/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "b6234c321f263c503268e3b205f3d9755f9d14ed"
+PV = "v1.0.0-rc0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE.code ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_digest_file_sysroot_preprocess"
+
+go_digest_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/go-errors/go-errors_git.bb b/import-layers/meta-virtualization/recipes-containers/go-errors/go-errors_git.bb
new file mode 100644
index 0000000..3bb74a7
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-errors/go-errors_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Simple error handling primitives"
+HOMEPAGE = "https://github.com/pkg/errors"
+SECTION = "devel/go"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=6fe682a02df52c6653f33bd0f7126b5a"
+
+SRCNAME = "errors"
+
+PKG_NAME = "github.com/pkg/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "248dadf4e9068a0b3e79f02ed0a610d935de5302"
+PV = "v0.8.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_errors_file_sysroot_preprocess"
+
+go_errors_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb b/import-layers/meta-virtualization/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb
new file mode 100644
index 0000000..e942e4e
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "A Commander for modern Go CLI interactions"
+HOMEPAGE = "https://github.com/spf13/cobra"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE.txt;md5=920d76114a32b0fb75b3f2718c5a91be"
+
+SRCNAME = "cobra"
+
+PKG_NAME = "github.com/spf13/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "b5d8e8f46a2f829f755b6e33b454e25c61c935e1"
+PV = "v0.0.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE.txt ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "cobra_file_sysroot_preprocess"
+
+cobra_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb b/import-layers/meta-virtualization/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb
new file mode 100644
index 0000000..2fbcb43
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags."
+HOMEPAGE = "https://github.com/spf13/pflag"
+SECTION = "devel/go"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=1e8b7dc8b906737639131047a590f21d"
+
+SRCNAME = "pflag"
+
+PKG_NAME = "github.com/spf13/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
+PV = "v1.0.0-rc4+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "pflag_file_sysroot_preprocess"
+
+pflag_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch b/import-layers/meta-virtualization/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch
new file mode 100644
index 0000000..f9cecc0
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch
@@ -0,0 +1,119 @@
+From 5c957671a511441b112b137b88bf0b1f31adac20 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Sat, 21 Jan 2017 11:57:13 +0000
+Subject: [PATCH] Use AC_HEADER_MAJOR to detect major()/minor()/makedev()
+
+commit af6824fce9c9536fbcabef8d5547f6c486f55fdf from
+git://github.com/lxc/lxc.git
+
+Before the change build failed on Gentoo as:
+
+  bdev/lxclvm.c: In function 'lvm_detect':
+  bdev/lxclvm.c:140:4: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration]
+    major(statbuf.st_rdev), minor(statbuf.st_rdev));
+    ^~~~~
+  bdev/lxclvm.c:140:28: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration]
+    major(statbuf.st_rdev), minor(statbuf.st_rdev));
+                            ^~~~~
+
+glibc plans to remove <sys/sysmacros.h> from glibc's <sys/types.h>:
+    https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
+
+Gentoo already applied glibc patch to experimental glibc-2.24
+to start preparingfor the change.
+
+Autoconf has AC_HEADER_MAJOR to find out which header defines
+reqiured macros:
+    https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html
+
+This change should also increase portability across other libcs.
+
+Bug: https://bugs.gentoo.org/604360
+Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ configure.ac           | 3 +++
+ src/lxc/bdev/lxclvm.c  | 9 +++++++++
+ src/lxc/conf.c         | 8 ++++++++
+ src/lxc/lxccontainer.c | 8 ++++++++
+ 4 files changed, 28 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8f31c29..924baa1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -601,6 +601,9 @@ AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
+ # Check for some headers
+ AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
+ 
++# lookup major()/minor()/makedev()
++AC_HEADER_MAJOR
++
+ # Check for some syscalls functions
+ AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat])
+ 
+diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c
+index 3d41b10..419d1c2 100644
+--- a/src/lxc/bdev/lxclvm.c
++++ b/src/lxc/bdev/lxclvm.c
+@@ -32,10 +32,19 @@
+ #include <sys/wait.h>
+ 
+ #include "bdev.h"
++#include "config.h"
+ #include "log.h"
+ #include "lxclvm.h"
+ #include "utils.h"
+ 
++/* major()/minor() */
++#ifdef MAJOR_IN_MKDEV
++#    include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++#    include <sys/sysmacros.h>
++#endif
++
+ lxc_log_define(lxclvm, lxc);
+ 
+ extern char *dir_new_path(char *src, const char *oldname, const char *name,
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index 3b023ef..53406ca 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -39,6 +39,14 @@
+ #include <grp.h>
+ #include <time.h>
+ 
++/* makedev() */
++#ifdef MAJOR_IN_MKDEV
++#    include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++#    include <sys/sysmacros.h>
++#endif
++
+ #ifdef HAVE_STATVFS
+ #include <sys/statvfs.h>
+ #endif
+diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
+index 9f12ca2..aa02833 100644
+--- a/src/lxc/lxccontainer.c
++++ b/src/lxc/lxccontainer.c
+@@ -61,6 +61,14 @@
+ #include "utils.h"
+ #include "version.h"
+ 
++/* major()/minor() */
++#ifdef MAJOR_IN_MKDEV
++#    include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++#    include <sys/sysmacros.h>
++#endif
++
+ #if HAVE_IFADDRS_H
+ #include <ifaddrs.h>
+ #else
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb b/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb
index 53068a8..c98d1a7 100644
--- a/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb
+++ b/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb
@@ -10,6 +10,7 @@
 		libcap-bin \
 		bridge-utils \
 		dnsmasq \
+		initscripts \
 		perl-module-strict \
 		perl-module-getopt-long \
 		perl-module-vars \
@@ -18,8 +19,11 @@
 		perl-module-constant \
 		perl-module-overload \
 		perl-module-exporter-heavy \
+"
+RDEPENDS_${PN}_append_libc-glibc = "\
 		glibc-utils \
 "
+
 RDEPENDS_${PN}-ptest += "file make"
 
 SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
@@ -30,6 +34,7 @@
 	file://lxc-fix-B-S.patch \
 	file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
 	file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
+	file://Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch \
 	"
 
 SRC_URI[md5sum] = "04a7245a614cd3296b0ae9ceeeb83fbb"
@@ -50,9 +55,6 @@
 
 CFLAGS_append = " -Wno-error=deprecated-declarations"
 
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns2"
-
 PACKAGECONFIG ??= "templates \
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
 "
@@ -63,6 +65,7 @@
 PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
 PACKAGECONFIG[seccomp] ="--enable-seccomp,--disable-seccomp,libseccomp,libseccomp"
 PACKAGECONFIG[python] = "--enable-python,--disable-python,python3,python3-core"
+PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua,lua"
 
 # required by python3 to run setup.py
 export BUILD_SYS
@@ -84,17 +87,19 @@
 # For LXC the docdir only contains example configuration files and should be included in the lxc package
 FILES_${PN} += "${docdir}"
 FILES_${PN} += "${libdir}/python3*"
-FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
+FILES_${PN} += "${datadir}/lua/*"
+FILES_${PN} += "${libdir}/lua/lxc/*"
+FILES_${PN}-dbg += "${libdir}/lua/lxc/.debug"
+FILES_${PN}-dbg += "${libexecdir}/lxc/.debug ${libexecdir}/lxc/hooks/.debug"
 PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking"
 FILES_${PN}-templates += "${datadir}/lxc/templates"
 RDEPENDS_${PN}-templates += "bash"
 
 ALLOW_EMPTY_${PN}-networking = "1"
 
-FILES_${PN}-setup += "/etc/tmpfiles.d"
-FILES_${PN}-setup += "/lib/systemd/system"
-FILES_${PN}-setup += "/usr/lib/systemd/system"
-FILES_${PN}-setup += "/etc/init.d"
+FILES_${PN}-setup += "${sysconfdir}/tmpfiles.d"
+FILES_${PN}-setup += "${systemd_system_unitdir}"
+FILES_${PN}-setup += "${sysconfdir}/init.d"
 
 PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
 
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-image-spec/oci-image-spec_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-image-spec/oci-image-spec_git.bb
new file mode 100644
index 0000000..92a8399
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-image-spec/oci-image-spec_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The OCI Image Format project creates and maintains the software shipping container image format spec"
+HOMEPAGE = "https://github.com/opencontainers/image-spec"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=27ef03aa2da6e424307f102e8b42621d"
+
+SRCNAME = "image-spec"
+
+PKG_NAME = "github.com/opencontainers/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "91d3eaabebcdc329edd9b4ff0f28f8f90022201f"
+PV = "v1.0.0-rc4+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "image_spec_file_sysroot_preprocess"
+
+image_spec_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
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
new file mode 100644
index 0000000..29a8926
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -0,0 +1,61 @@
+HOMEPAGE = "https://github.com/opencontainers/image-tools"
+SUMMARY = "A collection of tools for working with the OCI image format specification"
+LICENSE = "Apache-2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+DEPENDS = "\
+           oci-image-spec \
+           oci-runtime-spec \
+           go-digest \
+           go-errors \
+           spf13-cobra \
+           spf13-pflag \
+          "
+
+SRC_URI = "git://github.com/opencontainers/image-tools.git"
+SRCREV = "a358e03fde4e3628bf9fb7656bf643b63f975636"
+PV = "0.1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit go
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package. 
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+	export GOARCH="${TARGET_GOARCH}"
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+	# Setup vendor directory so that it can be used in GOPATH.
+	#
+	# Go looks in a src directory under any directory in GOPATH but riddler
+	# uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
+	#
+	# We also need to link in the ipallocator directory as that is not under
+	# a src directory.
+	ln -sfn . "${S}/vendor/src"
+	mkdir -p "${S}/vendor/src/github.com/opencontainers/image-tools/"
+	ln -sfn "${S}/image" "${S}/vendor/src/github.com/opencontainers/image-tools/image"
+	export GOPATH="${S}/vendor"
+
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	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}"
+
+	oe_runmake tools
+}
+
+do_install() {
+	install -d ${D}/${sbindir}
+	install ${S}/oci-create-runtime-bundle ${D}/${sbindir}/
+	install ${S}/oci-image-validate ${D}/${sbindir}/
+	install ${S}/oci-unpack ${D}/${sbindir}/
+}
+
+INSANE_SKIP_${PN} += "ldflags"
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
new file mode 100644
index 0000000..82f852f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The Open Container Initiative develops specifications for standards on Operating System process and application containers"
+HOMEPAGE = "https://github.com/opencontainers/runtime-spec"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=b355a61a394a504dacde901c958f662c"
+
+SRCNAME = "runtime-spec"
+
+PKG_NAME = "github.com/opencontainers/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "4af0c72f92aacf1b43618d7986197d8209fadf0b"
+PV = "v1.0.0-rc4+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go" -not -path "*/.tool/*"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "runtime_spec_file_sysroot_preprocess"
+
+runtime_spec_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
new file mode 100644
index 0000000..4f77dce
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
@@ -0,0 +1,35 @@
+HOMEPAGE = "https://github.com/opencontainers/runtime-tools"
+SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b355a61a394a504dacde901c958f662c"
+
+SRC_URI = "git://github.com/opencontainers/runtime-tools.git"
+
+SRCREV = "038b0c99b82f3c08de31f6b09e693eb24644affd"
+PV = "0.0.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit go
+
+do_compile() {
+	export GOARCH="${TARGET_GOARCH}"
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+	export GOPATH="${S}"
+
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	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}"
+
+	oe_runmake
+}
+
+do_install() {
+	install -d ${D}/${sbindir}
+	install ${S}/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool
+}
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-configure-drop-selinux-support.patch b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-configure-drop-selinux-support.patch
new file mode 100644
index 0000000..510126e
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-configure-drop-selinux-support.patch
@@ -0,0 +1,25 @@
+From 12c263703a0b0ae92566de7e5440fce7b59cd9be Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Tue, 8 Nov 2016 13:16:19 -0500
+Subject: [PATCH] configure: drop selinux support
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c1275acb253d..eaba7fbb57e2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,7 +8,6 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+ 
+ PKG_CHECK_MODULES([YAJL], [yajl >= 2.0.0])
+-PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.0.0])
+ PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.23.0])
+ 
+ AC_MSG_CHECKING([whether to disable argument checking])
+-- 
+2.4.0.53.g8440f74
+
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
new file mode 100644
index 0000000..507cd08
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
@@ -0,0 +1,40 @@
+From 9b66394c712ec0d0fcb2052baa7f590621a53461 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Tue, 8 Nov 2016 13:15:46 -0500
+Subject: [PATCH] selinux: drop selinux support
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ src/systemdhook.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/src/systemdhook.c b/src/systemdhook.c
+index 274e5b910699..b9e8f1be376a 100644
+--- a/src/systemdhook.c
++++ b/src/systemdhook.c
+@@ -14,7 +14,6 @@
+ #include <errno.h>
+ #include <inttypes.h>
+ #include <linux/limits.h>
+-#include <selinux/selinux.h>
+ #include <yajl/yajl_tree.h>
+ 
+ #include "config.h"
+@@ -538,14 +537,6 @@ static int prestart(const char *rootfs,
+ 			}
+ 		}
+ 
+-		if (strcmp("", mount_label)) {
+-			rc = setfilecon(journal_dir, (security_context_t)mount_label);
+-			if (rc < 0) {
+-				pr_perror("Failed to set journal dir selinux context");
+-				return -1;
+-			}
+-		}
+-
+ 		if (makepath(cont_journal_dir, 0755) == -1) {
+ 			if (errno != EEXIST) {
+ 				pr_perror("Failed to mkdir container journal dir: %s", cont_journal_dir);
+-- 
+2.4.0.53.g8440f74
+
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
new file mode 100644
index 0000000..872872a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "OCI systemd hook enables users to run systemd in docker and OCI"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504"
+PRIORITY = "optional"
+
+DEPENDS = "yajl util-linux"
+
+SRCREV = "ca515c1f399bd0b16e94b7c34aa1ef20498beca6"
+SRC_URI = "git://github.com/projectatomic/oci-systemd-hook \
+           file://0001-selinux-drop-selinux-support.patch \
+           file://0001-configure-drop-selinux-support.patch \
+"
+
+PV = "0.0.1+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+EXTRA_OECONF += "--libexecdir=${libexecdir}/oci/hooks.d"
+
+# nothing to compile, we do it all in the install task
+do_compile[noexec] = "1"
+
+do_install() {
+    # Avoid building docs, and other artifacts by surgically calling the
+    # semi-internal target of "install-exec-am"
+    oe_runmake 'DESTDIR=${D}' install-exec-am
+}
+
+FILES_${PN} += "${libexecdir}/oci/hooks.d/"
+
diff --git a/import-layers/meta-virtualization/recipes-containers/riddler/riddler_git.bb b/import-layers/meta-virtualization/recipes-containers/riddler/riddler_git.bb
new file mode 100644
index 0000000..ae6c5ec
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/riddler/riddler_git.bb
@@ -0,0 +1,48 @@
+HOMEPAGE = "https://github.com/jfrazelle/riddler"
+SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
+
+SRC_URI = "git://github.com/jfrazelle/riddler;branch=master"
+SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
+PV = "0.1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit go
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package. 
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+	export GOARCH="${TARGET_GOARCH}"
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+	# Setup vendor directory so that it can be used in GOPATH.
+	#
+	# Go looks in a src directory under any directory in GOPATH but riddler
+	# uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
+	#
+	# We also need to link in the ipallocator directory as that is not under
+	# a src directory.
+	ln -sfn . "${S}/vendor/src"
+	mkdir -p "${S}/vendor/src/github.com/jessfraz/riddler"
+	ln -sfn "${S}/parse" "${S}/vendor/src/github.com/jessfraz/riddler/parse"
+	export GOPATH="${S}/vendor"
+
+	# Pass the needed cflags/ldflags so that cgo
+	# can find the needed headers files and libraries
+	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}"
+
+	oe_runmake static
+}
+
+do_install() {
+	install -d ${D}/${sbindir}
+	install ${S}/riddler ${D}/${sbindir}/riddler
+}
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
new file mode 100644
index 0000000..96d48ca
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb
@@ -0,0 +1,11 @@
+include runc.inc
+
+# Note: this rev is before the required protocol field, update when all components
+#       have been updated to match.
+SRCREV = "2f7393a47307a16f8cee44a37b262e8b81021e3e"
+SRC_URI = "git://github.com/docker/runc.git;nobranch=1 \
+          "
+
+RUNC_VERSION = "1.0.0-rc2"
+PROVIDES += "virtual/runc"
+RPROVIDES_${PN} = "virtual/runc"
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
new file mode 100644
index 0000000..4a6e8cd
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb
@@ -0,0 +1,15 @@
+include runc.inc
+
+SRCREV = "75f8da7c889acc4509a0cf6f0d3a8f9584778375"
+SRC_URI = "git://github.com/opencontainers/runc;branch=master \
+          "
+RUNC_VERSION = "1.0.0-rc3"
+PROVIDES += "virtual/runc"
+RPROVIDES_${PN} = "virtual/runc"
+
+do_compile_prepend() {
+	# Go looks in a src directory under any directory in GOPATH but
+	# runc-opencontainers uses 'vendor' instead of 'vendor/src'. We can fix
+	# this with a symlink.
+	ln -sfn . "${S}/vendor/src"
+}
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc_git.bb b/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
similarity index 82%
rename from import-layers/meta-virtualization/recipes-containers/runc/runc_git.bb
rename to import-layers/meta-virtualization/recipes-containers/runc/runc.inc
index 905a751..4808547 100644
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
@@ -2,24 +2,15 @@
 SUMMARY = "runc container cli tools"
 DESCRIPTION = "runc is a CLI tool for spawning and running containers according to the OCI specification."
 
-# Note: this rev is before the required protocol field, update when all components
-#       have been updated to match.
-SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
-SRC_URI = "\
-	git://github.com/opencontainers/runc;branch=master \
-	"
-
 # Apache-2.0 for containerd
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
 
 S = "${WORKDIR}/git"
 
-RUNC_VERSION = "1.0.0-rc1"
 PV = "${RUNC_VERSION}+git${SRCREV}"
 
-DEPENDS = "go-cross \
-    "
+inherit go
 RRECOMMENDS_${PN} = "lxc docker"
 
 LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
@@ -27,11 +18,11 @@
 do_configure[noexec] = "1"
 EXTRA_OEMAKE="BUILDTAGS=''"
 
-inherit go-osarchmap
+inherit goarch
 
 do_compile() {
 	export GOARCH="${TARGET_GOARCH}"
-
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
 	# docker to download its dependencies but rather
 	# use dependencies packaged independently.
@@ -43,6 +34,7 @@
 
 	(cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
 	export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
 	cd -
 
 	# Pass the needed cflags/ldflags so that cgo
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4.inc
deleted file mode 100644
index a65459f..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-require go-common.inc
-
-PV = "1.4.3"
-GO_BASEVERSION = "1.4"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-SRC_URI += "\
-        file://016-armhf-elf-header.patch \
-        file://go-cross-backport-cmd-link-support-new-386-amd64-rel.patch \
-        file://syslog.patch \
-"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
-SRC_URI[md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch
deleted file mode 100644
index 1ae53a3..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: Use correct ELF header for armhf binaries.
-Author: Adam Conrad <adconrad@ubuntu.com>
-Last-Update: 2013-07-08
-
-Index: go/src/cmd/ld/elf.c
-===================================================================
---- go.orig/src/cmd/ld/elf.c	2015-02-20 10:49:58.763451586 -0800
-+++ go/src/cmd/ld/elf.c	2015-02-20 10:49:27.895478521 -0800
-@@ -57,7 +57,11 @@
- 	case '5':
- 		// we use EABI on both linux/arm and freebsd/arm.
- 		if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd)
--			hdr.flags = 0x5000002; // has entry point, Version5 EABI
-+#ifdef __ARM_PCS_VFP
-+			hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI
-+#else
-+			hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI
-+#endif
- 		// fallthrough
- 	default:
- 		hdr.phoff = ELF32HDRSIZE;	/* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
deleted file mode 100644
index de3f49c..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From d6eefad445831c161fca130f9bdf7b3848aac23c Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Tue, 29 Mar 2016 21:14:33 -0400
-Subject: [PATCH] go-cross: backport "cmd/link: support new 386/amd64
- relocations"
-
-Newer binutils won't support building older go-1.4.3 as per:
-
-https://github.com/golang/go/issues/13114
-
-Upstream commit 914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7 (see subj)
-was identified as the fix and nominated for 1.4.4 but that release
-never happened.  The paths in 1.4.3 aren't the same as go1.6beta1~662
-where this commit appeared, but the NetBSD folks indicated what a
-1.4.3 backport would look like here: https://gnats.netbsd.org/50777
-
-This is based on that, but without the BSD wrapper infrastructure
-layer that makes things look like patches of patches.
-
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c
-index 18b5aa311981..2e9d339aef87 100644
---- a/src/cmd/6l/asm.c
-+++ b/src/cmd/6l/asm.c
-@@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r)
- 		return;
- 	
- 	case 256 + R_X86_64_GOTPCREL:
-+	case 256 + R_X86_64_GOTPCRELX:
-+	case 256 + R_X86_64_REX_GOTPCRELX:
- 		if(targ->type != SDYNIMPORT) {
- 			// have symbol
- 			if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
-diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c
-index 98c04240374f..cff29488e8af 100644
---- a/src/cmd/8l/asm.c
-+++ b/src/cmd/8l/asm.c
-@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r)
- 		return;		
- 	
- 	case 256 + R_386_GOT32:
-+	case 256 + R_386_GOT32X:
- 		if(targ->type != SDYNIMPORT) {
- 			// have symbol
- 			if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
-diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h
-index e84d996f2596..bbf2cfaa3cc0 100644
---- a/src/cmd/ld/elf.h
-+++ b/src/cmd/ld/elf.h
-@@ -478,32 +478,47 @@ typedef struct {
-  * Relocation types.
-  */
- 
--#define	R_X86_64_NONE	0	/* No relocation. */
--#define	R_X86_64_64	1	/* Add 64 bit symbol value. */
--#define	R_X86_64_PC32	2	/* PC-relative 32 bit signed sym value. */
--#define	R_X86_64_GOT32	3	/* PC-relative 32 bit GOT offset. */
--#define	R_X86_64_PLT32	4	/* PC-relative 32 bit PLT offset. */
--#define	R_X86_64_COPY	5	/* Copy data from shared object. */
--#define	R_X86_64_GLOB_DAT 6	/* Set GOT entry to data address. */
--#define	R_X86_64_JMP_SLOT 7	/* Set GOT entry to code address. */
--#define	R_X86_64_RELATIVE 8	/* Add load address of shared object. */
--#define	R_X86_64_GOTPCREL 9	/* Add 32 bit signed pcrel offset to GOT. */
--#define	R_X86_64_32	10	/* Add 32 bit zero extended symbol value */
--#define	R_X86_64_32S	11	/* Add 32 bit sign extended symbol value */
--#define	R_X86_64_16	12	/* Add 16 bit zero extended symbol value */
--#define	R_X86_64_PC16	13	/* Add 16 bit signed extended pc relative symbol value */
--#define	R_X86_64_8	14	/* Add 8 bit zero extended symbol value */
--#define	R_X86_64_PC8	15	/* Add 8 bit signed extended pc relative symbol value */
--#define	R_X86_64_DTPMOD64 16	/* ID of module containing symbol */
--#define	R_X86_64_DTPOFF64 17	/* Offset in TLS block */
--#define	R_X86_64_TPOFF64 18	/* Offset in static TLS block */
--#define	R_X86_64_TLSGD	19	/* PC relative offset to GD GOT entry */
--#define	R_X86_64_TLSLD	20	/* PC relative offset to LD GOT entry */
--#define	R_X86_64_DTPOFF32 21	/* Offset in TLS block */
--#define	R_X86_64_GOTTPOFF 22	/* PC relative offset to IE GOT entry */
--#define	R_X86_64_TPOFF32 23	/* Offset in static TLS block */
--
--#define	R_X86_64_COUNT	24	/* Count of defined relocation types. */
-+#define	R_X86_64_NONE           0
-+#define	R_X86_64_64             1
-+#define	R_X86_64_PC32           2
-+#define	R_X86_64_GOT32          3
-+#define	R_X86_64_PLT32          4
-+#define	R_X86_64_COPY           5
-+#define	R_X86_64_GLOB_DAT       6
-+#define	R_X86_64_JMP_SLOT       7
-+#define	R_X86_64_RELATIVE       8
-+#define	R_X86_64_GOTPCREL       9
-+#define	R_X86_64_32             10
-+#define	R_X86_64_32S            11
-+#define	R_X86_64_16             12
-+#define	R_X86_64_PC16           13
-+#define	R_X86_64_8              14
-+#define	R_X86_64_PC8            15
-+#define	R_X86_64_DTPMOD64       16
-+#define	R_X86_64_DTPOFF64       17
-+#define	R_X86_64_TPOFF64        18
-+#define	R_X86_64_TLSGD          19
-+#define	R_X86_64_TLSLD          20
-+#define	R_X86_64_DTPOFF32       21
-+#define	R_X86_64_GOTTPOFF       22
-+#define	R_X86_64_TPOFF32        23
-+#define	R_X86_64_PC64           24
-+#define	R_X86_64_GOTOFF64       25
-+#define	R_X86_64_GOTPC32        26
-+#define	R_X86_64_GOT64          27
-+#define	R_X86_64_GOTPCREL64     28
-+#define	R_X86_64_GOTPC64        29
-+#define	R_X86_64_GOTPLT64       30
-+#define	R_X86_64_PLTOFF64       31
-+#define	R_X86_64_SIZE32         32
-+#define	R_X86_64_SIZE64         33
-+#define	R_X86_64_GOTPC32_TLSDEC 34
-+#define	R_X86_64_TLSDESC_CALL   35
-+#define	R_X86_64_TLSDESC        36
-+#define	R_X86_64_IRELATIVE      37
-+#define	R_X86_64_PC32_BND       40
-+#define	R_X86_64_GOTPCRELX      41
-+#define	R_X86_64_REX_GOTPCRELX  42
- 
- 
- #define	R_ALPHA_NONE		0	/* No reloc */
-@@ -581,39 +596,42 @@ typedef struct {
- #define	R_ARM_COUNT		38	/* Count of defined relocation types. */
- 
- 
--#define	R_386_NONE	0	/* No relocation. */
--#define	R_386_32	1	/* Add symbol value. */
--#define	R_386_PC32	2	/* Add PC-relative symbol value. */
--#define	R_386_GOT32	3	/* Add PC-relative GOT offset. */
--#define	R_386_PLT32	4	/* Add PC-relative PLT offset. */
--#define	R_386_COPY	5	/* Copy data from shared object. */
--#define	R_386_GLOB_DAT	6	/* Set GOT entry to data address. */
--#define	R_386_JMP_SLOT	7	/* Set GOT entry to code address. */
--#define	R_386_RELATIVE	8	/* Add load address of shared object. */
--#define	R_386_GOTOFF	9	/* Add GOT-relative symbol address. */
--#define	R_386_GOTPC	10	/* Add PC-relative GOT table address. */
--#define	R_386_TLS_TPOFF	14	/* Negative offset in static TLS block */
--#define	R_386_TLS_IE	15	/* Absolute address of GOT for -ve static TLS */
--#define	R_386_TLS_GOTIE	16	/* GOT entry for negative static TLS block */
--#define	R_386_TLS_LE	17	/* Negative offset relative to static TLS */
--#define	R_386_TLS_GD	18	/* 32 bit offset to GOT (index,off) pair */
--#define	R_386_TLS_LDM	19	/* 32 bit offset to GOT (index,zero) pair */
--#define	R_386_TLS_GD_32	24	/* 32 bit offset to GOT (index,off) pair */
--#define	R_386_TLS_GD_PUSH 25	/* pushl instruction for Sun ABI GD sequence */
--#define	R_386_TLS_GD_CALL 26	/* call instruction for Sun ABI GD sequence */
--#define	R_386_TLS_GD_POP 27	/* popl instruction for Sun ABI GD sequence */
--#define	R_386_TLS_LDM_32 28	/* 32 bit offset to GOT (index,zero) pair */
--#define	R_386_TLS_LDM_PUSH 29	/* pushl instruction for Sun ABI LD sequence */
--#define	R_386_TLS_LDM_CALL 30	/* call instruction for Sun ABI LD sequence */
--#define	R_386_TLS_LDM_POP 31	/* popl instruction for Sun ABI LD sequence */
--#define	R_386_TLS_LDO_32 32	/* 32 bit offset from start of TLS block */
--#define	R_386_TLS_IE_32	33	/* 32 bit offset to GOT static TLS offset entry */
--#define	R_386_TLS_LE_32	34	/* 32 bit offset within static TLS block */
--#define	R_386_TLS_DTPMOD32 35	/* GOT entry containing TLS index */
--#define	R_386_TLS_DTPOFF32 36	/* GOT entry containing TLS offset */
--#define	R_386_TLS_TPOFF32 37	/* GOT entry of -ve static TLS offset */
--
--#define	R_386_COUNT	38	/* Count of defined relocation types. */
-+#define	R_386_NONE          0
-+#define	R_386_32            1
-+#define	R_386_PC32          2
-+#define	R_386_GOT32         3
-+#define	R_386_PLT32         4
-+#define	R_386_COPY          5
-+#define	R_386_GLOB_DAT      6
-+#define	R_386_JMP_SLOT      7
-+#define	R_386_RELATIVE      8
-+#define	R_386_GOTOFF        9
-+#define	R_386_GOTPC         10
-+#define	R_386_TLS_TPOFF     14
-+#define	R_386_TLS_IE        15
-+#define	R_386_TLS_GOTIE     16
-+#define	R_386_TLS_LE        17
-+#define	R_386_TLS_GD        18
-+#define	R_386_TLS_LDM       19
-+#define	R_386_TLS_GD_32     24
-+#define	R_386_TLS_GD_PUSH   25
-+#define	R_386_TLS_GD_CALL   26
-+#define	R_386_TLS_GD_POP    27
-+#define	R_386_TLS_LDM_32    28
-+#define	R_386_TLS_LDM_PUSH  29
-+#define	R_386_TLS_LDM_CALL  30
-+#define	R_386_TLS_LDM_POP   31
-+#define	R_386_TLS_LDO_32    32
-+#define	R_386_TLS_IE_32     33
-+#define	R_386_TLS_LE_32     34
-+#define	R_386_TLS_DTPMOD32  35
-+#define	R_386_TLS_DTPOFF32  36
-+#define	R_386_TLS_TPOFF32   37
-+#define	R_386_TLS_GOTDESC   39
-+#define	R_386_TLS_DESC_CALL 40
-+#define	R_386_TLS_DESC      41
-+#define	R_386_IRELATIVE     42
-+#define	R_386_GOT32X        43
- 
- #define	R_PPC_NONE		0	/* No relocation. */
- #define	R_PPC_ADDR32		1
-diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c
-index dd5fa0d2a839..2e2fbd17377f 100644
---- a/src/cmd/ld/ldelf.c
-+++ b/src/cmd/ld/ldelf.c
-@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz)
- 	case R('6', R_X86_64_PC32):
- 	case R('6', R_X86_64_PLT32):
- 	case R('6', R_X86_64_GOTPCREL):
-+	case R('6', R_X86_64_GOTPCRELX):
-+	case R('6', R_X86_64_REX_GOTPCRELX):
- 	case R('8', R_386_32):
- 	case R('8', R_386_PC32):
- 	case R('8', R_386_GOT32):
- 	case R('8', R_386_PLT32):
- 	case R('8', R_386_GOTOFF):
- 	case R('8', R_386_GOTPC):
-+	case R('8', R_386_GOT32X):
- 		*siz = 4;
- 		break;
- 	case R('6', R_X86_64_64):
--- 
-2.7.2
-
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/syslog.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/syslog.patch
deleted file mode 100644
index ce82a4f..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/syslog.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go	2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go	2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
- 
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- 	// Severity.
- 
-@@ -100,6 +103,7 @@
- type serverConn interface {
- 	writeString(p Priority, hostname, tag, s, nl string) error
- 	close() error
-+	setWriteDeadline(t time.Time) error
- }
- 
- type netConn struct {
-@@ -273,7 +277,11 @@
- 		nl = "\n"
- 	}
- 
--	err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+	err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+	if err != nil {
-+		return 0, err
-+	}
-+	err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- 	if err != nil {
- 		return 0, err
- 	}
-@@ -305,6 +313,10 @@
- 	return n.conn.Close()
- }
- 
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+	return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go	2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go	2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- 	logPaths := []string{"/dev/log", "/var/run/syslog"}
- 	for _, network := range logTypes {
- 		for _, path := range logPaths {
--			conn, err := net.Dial(network, path)
-+			conn, err := net.DialTimeout(network, path, connectTimeout)
- 			if err != nil {
- 				continue
- 			} else {
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5.inc
deleted file mode 100644
index bb91ed8..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-require go-common.inc
-
-PV = "1.5.2"
-GO_BASEVERSION = "1.5"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-
-SRC_URI += "\
-       file://armhf-elf-header.patch \
-       file://syslog.patch \
-       file://fix-target-cc-for-build.patch \
-       file://fix-cc-handling.patch \
-       file://split-host-and-target-build.patch \
-       file://gotooldir.patch \
-"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
-SRC_URI[md5sum] = "38fed22e7b80672291e7cba7fb9c3475"
-SRC_URI[sha256sum] = "f3ddd624c00461641ce3d3a8d8e3c622392384ca7699e901b370a4eac5987a74"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch
deleted file mode 100644
index f56869b..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: go/src/cmd/link/internal/ld/elf.go
-===================================================================
---- go.orig/src/cmd/link/internal/ld/elf.go	2015-07-29 13:05:25.952533140 -0700
-+++ go/src/cmd/link/internal/ld/elf.go	2015-07-29 13:14:53.413112995 -0700
-@@ -780,7 +780,13 @@
- 	// 32-bit architectures
- 	case '5':
- 		// we use EABI on both linux/arm and freebsd/arm.
--		if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
-+		if HEADTYPE == obj.Hlinux {
-+			if Ctxt.Goarm == 7 {
-+				ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
-+			} else {
-+				ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
-+			}
-+		} else if HEADTYPE == obj.Hfreebsd {
- 			ehdr.flags = 0x5000002 // has entry point, Version5 EABI
- 		}
- 		fallthrough
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch
deleted file mode 100644
index 85770a9..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go	2015-07-29 14:48:40.323185807 -0700
-+++ go/src/cmd/go/build.go	2015-07-30 07:37:40.529818586 -0700
-@@ -2805,12 +2805,24 @@
- 	return b.ccompilerCmd("CC", defaultCC, objdir)
- }
- 
-+// gccCmd returns a gcc command line prefix
-+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gccCmdForReal() []string {
-+	return envList("CC", defaultCC)
-+}
-+
- // gxxCmd returns a g++ command line prefix
- // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
- func (b *builder) gxxCmd(objdir string) []string {
- 	return b.ccompilerCmd("CXX", defaultCXX, objdir)
- }
- 
-+// gxxCmd returns a g++ command line prefix
-+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gxxCmdForReal() []string {
-+	return envList("CXX", defaultCXX)
-+}
-+
- // ccompilerCmd returns a command line prefix for the given environment
- // variable and using the default command when the variable is empty.
- func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
-Index: go/src/cmd/go/env.go
-===================================================================
---- go.orig/src/cmd/go/env.go	2015-07-29 14:48:40.323185807 -0700
-+++ go/src/cmd/go/env.go	2015-07-30 07:40:54.461655721 -0700
-@@ -52,10 +52,9 @@
- 
- 	if goos != "plan9" {
- 		cmd := b.gccCmd(".")
--		env = append(env, envVar{"CC", cmd[0]})
-+		env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
- 		env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
--		cmd = b.gxxCmd(".")
--		env = append(env, envVar{"CXX", cmd[0]})
-+		env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
- 	}
- 
- 	if buildContext.CgoEnabled {
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch
deleted file mode 100644
index adfeb6b..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash	2015-07-29 13:28:11.334031696 -0700
-+++ go/src/make.bash	2015-07-29 13:36:55.814465630 -0700
-@@ -158,7 +158,7 @@
- fi
- 
- echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
-+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
- echo
- 
- rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/gotooldir.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/gotooldir.patch
deleted file mode 100644
index 473a328..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/gotooldir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: go/src/go/build/build.go
-===================================================================
---- go.orig/src/go/build/build.go
-+++ go/src/go/build/build.go
-@@ -1388,7 +1388,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".
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
- 		}
- 
- 		cgoExe := tool("cgo")
--		if a.cgo != nil && a.cgo.target != "" {
-+		if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
- 			cgoExe = a.cgo.target
- 		}
- 		outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch
deleted file mode 100644
index 85fb240..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash
-+++ go/src/make.bash
-@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then
- 	buildall=""
- 	shift
- fi
--./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
--# Delay move of dist tool to now, because bootstrap may clear tool directory.
--mv cmd/dist/dist "$GOTOOLDIR"/dist
--echo
- 
--if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
-+do_host_build="yes"
-+do_target_build="yes"
-+if [ "$1" = "--target-only" ]; then
-+	do_host_build="no"
-+	shift
-+elif [ "$1" = "--host-only" ]; then
-+	do_target_build="no"
-+	shift
-+fi
-+
-+if [ "$do_host_build" = "yes" ]; then
-+	./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
-+	# Delay move of dist tool to now, because bootstrap may clear tool directory.
-+	mv cmd/dist/dist "$GOTOOLDIR"/dist
-+	echo
-+
- 	echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
- 	# CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
- 	# use the host compiler, CC, from `cmd/dist/dist env` instead.
-@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
- 	echo
- fi
- 
--echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
--echo
-+if [ "$do_target_build" = "yes" ]; then
-+    GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
-+    echo "##### Building packages and commands for $GOOS/$GOARCH."
-+    if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
-+	rm -rf ./host-tools
-+	mkdir ./host-tools
-+	mv "$GOTOOLDIR"/* ./host-tools
-+	GOTOOLDIR="$PWD/host-tools"
-+    fi
-+    GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
-+    echo
- 
--rm -f "$GOTOOLDIR"/go_bootstrap
-+    rm -f "$GOTOOLDIR"/go_bootstrap
-+fi
- 
- if [ "$1" != "--no-banner" ]; then
- 	"$GOTOOLDIR"/dist banner
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/syslog.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/syslog.patch
deleted file mode 100644
index ce82a4f..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/syslog.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go	2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go	2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
- 
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- 	// Severity.
- 
-@@ -100,6 +103,7 @@
- type serverConn interface {
- 	writeString(p Priority, hostname, tag, s, nl string) error
- 	close() error
-+	setWriteDeadline(t time.Time) error
- }
- 
- type netConn struct {
-@@ -273,7 +277,11 @@
- 		nl = "\n"
- 	}
- 
--	err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+	err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+	if err != nil {
-+		return 0, err
-+	}
-+	err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- 	if err != nil {
- 		return 0, err
- 	}
-@@ -305,6 +313,10 @@
- 	return n.conn.Close()
- }
- 
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+	return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go	2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go	2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- 	logPaths := []string{"/dev/log", "/var/run/syslog"}
- 	for _, network := range logTypes {
- 		for _, path := range logPaths {
--			conn, err := net.Dial(network, path)
-+			conn, err := net.DialTimeout(network, path, connectTimeout)
- 			if err != nil {
- 				continue
- 			} else {
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6.inc
deleted file mode 100644
index 7a57eaf..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-require go-common.inc
-
-PV = "1.6.2"
-GO_BASEVERSION = "1.6"
-FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
-
-
-SRC_URI += "\
-       file://armhf-elf-header.patch \
-       file://syslog.patch \
-       file://fix-target-cc-for-build.patch \
-       file://fix-cc-handling.patch \
-       file://split-host-and-target-build.patch \
-       file://gotooldir.patch \
-"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
-SRC_URI[md5sum] = "d1b50fa98d9a71eeee829051411e6207"
-SRC_URI[sha256sum] = "787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch
deleted file mode 100644
index 6113138..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: go/src/cmd/link/internal/ld/elf.go
-===================================================================
---- go.orig/src/cmd/link/internal/ld/elf.go
-+++ go/src/cmd/link/internal/ld/elf.go
-@@ -827,7 +827,13 @@
- 	// 32-bit architectures
- 	case '5':
- 		// we use EABI on both linux/arm and freebsd/arm.
--		if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
-+		if HEADTYPE == obj.Hlinux {
-+			if Ctxt.Goarm == 7 {
-+				ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
-+			} else {
-+				ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
-+			}
-+		} else if HEADTYPE == obj.Hfreebsd {
- 			// We set a value here that makes no indication of which
- 			// float ABI the object uses, because this is information
- 			// used by the dynamic linker to compare executables and
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch
deleted file mode 100644
index 85770a9..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go	2015-07-29 14:48:40.323185807 -0700
-+++ go/src/cmd/go/build.go	2015-07-30 07:37:40.529818586 -0700
-@@ -2805,12 +2805,24 @@
- 	return b.ccompilerCmd("CC", defaultCC, objdir)
- }
- 
-+// gccCmd returns a gcc command line prefix
-+// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gccCmdForReal() []string {
-+	return envList("CC", defaultCC)
-+}
-+
- // gxxCmd returns a g++ command line prefix
- // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
- func (b *builder) gxxCmd(objdir string) []string {
- 	return b.ccompilerCmd("CXX", defaultCXX, objdir)
- }
- 
-+// gxxCmd returns a g++ command line prefix
-+// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
-+func (b *builder) gxxCmdForReal() []string {
-+	return envList("CXX", defaultCXX)
-+}
-+
- // ccompilerCmd returns a command line prefix for the given environment
- // variable and using the default command when the variable is empty.
- func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
-Index: go/src/cmd/go/env.go
-===================================================================
---- go.orig/src/cmd/go/env.go	2015-07-29 14:48:40.323185807 -0700
-+++ go/src/cmd/go/env.go	2015-07-30 07:40:54.461655721 -0700
-@@ -52,10 +52,9 @@
- 
- 	if goos != "plan9" {
- 		cmd := b.gccCmd(".")
--		env = append(env, envVar{"CC", cmd[0]})
-+		env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
- 		env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
--		cmd = b.gxxCmd(".")
--		env = append(env, envVar{"CXX", cmd[0]})
-+		env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
- 	}
- 
- 	if buildContext.CgoEnabled {
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch
deleted file mode 100644
index adfeb6b..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash	2015-07-29 13:28:11.334031696 -0700
-+++ go/src/make.bash	2015-07-29 13:36:55.814465630 -0700
-@@ -158,7 +158,7 @@
- fi
- 
- echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
-+CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
- echo
- 
- rm -f "$GOTOOLDIR"/go_bootstrap
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/gotooldir.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/gotooldir.patch
deleted file mode 100644
index 473a328..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/gotooldir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: go/src/go/build/build.go
-===================================================================
---- go.orig/src/go/build/build.go
-+++ go/src/go/build/build.go
-@@ -1388,7 +1388,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".
-Index: go/src/cmd/go/build.go
-===================================================================
---- go.orig/src/cmd/go/build.go
-+++ go/src/cmd/go/build.go
-@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
- 		}
- 
- 		cgoExe := tool("cgo")
--		if a.cgo != nil && a.cgo.target != "" {
-+		if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
- 			cgoExe = a.cgo.target
- 		}
- 		outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch
deleted file mode 100644
index 85fb240..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: go/src/make.bash
-===================================================================
---- go.orig/src/make.bash
-+++ go/src/make.bash
-@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then
- 	buildall=""
- 	shift
- fi
--./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
--# Delay move of dist tool to now, because bootstrap may clear tool directory.
--mv cmd/dist/dist "$GOTOOLDIR"/dist
--echo
- 
--if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
-+do_host_build="yes"
-+do_target_build="yes"
-+if [ "$1" = "--target-only" ]; then
-+	do_host_build="no"
-+	shift
-+elif [ "$1" = "--host-only" ]; then
-+	do_target_build="no"
-+	shift
-+fi
-+
-+if [ "$do_host_build" = "yes" ]; then
-+	./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
-+	# Delay move of dist tool to now, because bootstrap may clear tool directory.
-+	mv cmd/dist/dist "$GOTOOLDIR"/dist
-+	echo
-+
- 	echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
- 	# CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
- 	# use the host compiler, CC, from `cmd/dist/dist env` instead.
-@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
- 	echo
- fi
- 
--echo "##### Building packages and commands for $GOOS/$GOARCH."
--CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
--echo
-+if [ "$do_target_build" = "yes" ]; then
-+    GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
-+    echo "##### Building packages and commands for $GOOS/$GOARCH."
-+    if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
-+	rm -rf ./host-tools
-+	mkdir ./host-tools
-+	mv "$GOTOOLDIR"/* ./host-tools
-+	GOTOOLDIR="$PWD/host-tools"
-+    fi
-+    GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
-+    echo
- 
--rm -f "$GOTOOLDIR"/go_bootstrap
-+    rm -f "$GOTOOLDIR"/go_bootstrap
-+fi
- 
- if [ "$1" != "--no-banner" ]; then
- 	"$GOTOOLDIR"/dist banner
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/syslog.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/syslog.patch
deleted file mode 100644
index ce82a4f..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/syslog.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
---- go/src/log/syslog/syslog.go	2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go	2014-10-03 11:44:37.710403200 -0700
-@@ -33,6 +33,9 @@
- const severityMask = 0x07
- const facilityMask = 0xf8
- 
-+var writeTimeout = 1 * time.Second
-+var connectTimeout = 1 * time.Second
-+
- const (
- 	// Severity.
- 
-@@ -100,6 +103,7 @@
- type serverConn interface {
- 	writeString(p Priority, hostname, tag, s, nl string) error
- 	close() error
-+	setWriteDeadline(t time.Time) error
- }
- 
- type netConn struct {
-@@ -273,7 +277,11 @@
- 		nl = "\n"
- 	}
- 
--	err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
-+	err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
-+	if err != nil {
-+		return 0, err
-+	}
-+	err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
- 	if err != nil {
- 		return 0, err
- 	}
-@@ -305,6 +313,10 @@
- 	return n.conn.Close()
- }
- 
-+func (n *netConn) setWriteDeadline(t time.Time) error {
-+	return n.conn.SetWriteDeadline(t)
-+}
-+
- // NewLogger creates a log.Logger whose output is written to
- // the system log service with the specified priority. The logFlag
- // argument is the flag set passed through to log.New to create
-diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
---- go/src/log/syslog/syslog_unix.go	2013-11-28 13:38:28.000000000 -0800
-+++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go	2014-10-03 11:44:39.010403175 -0700
-@@ -19,7 +19,7 @@
- 	logPaths := []string{"/dev/log", "/var/run/syslog"}
- 	for _, network := range logTypes {
- 		for _, path := range logPaths {
--			conn, err := net.Dial(network, path)
-+			conn, err := net.DialTimeout(network, path, connectTimeout)
- 			if err != nil {
- 				continue
- 			} else {
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-common.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-common.inc
deleted file mode 100644
index f9587ea..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-common.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Go programming language compiler"
-DESCRIPTION = " The Go programming language is an open source project to make \
- programmers more productive. Go is expressive, concise, clean, and\
- efficient. Its concurrency mechanisms make it easy to write programs\
- that get the most out of multicore and networked machines, while its\
- novel type system enables flexible and modular program construction.\
- Go compiles quickly to machine code yet has the convenience of\
- garbage collection and the power of run-time reflection. It's a\
- fast, statically typed, compiled language that feels like a\
- dynamically typed, interpreted language."
-HOMEPAGE = " http://golang.org/"
-LICENSE = "BSD-3-Clause"
-
-inherit go-osarchmap
-
-SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz"
-S = "${WORKDIR}/go"
-B = "${S}"
-
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross.inc
deleted file mode 100644
index 3174987..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-inherit cross
-
-# libgcc is required for the target specific libraries to build properly
-DEPENDS += "go-native libgcc"
-
-# Prevent runstrip from running because you get errors when the host arch != target arch
-#INHIBIT_PACKAGE_STRIP = "1"
-STRIP = "echo"
-
-export GOHOSTOS = "${BUILD_GOOS}"
-export GOHOSTARCH = "${BUILD_GOARCH}"
-export GOOS = "${TARGET_GOOS}"
-export GOARCH = "${TARGET_GOARCH}"
-export GOARM = "${TARGET_GOARM}"
-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}"
-CC = "${@d.getVar('BUILD_CC', True).strip()}"
-
-do_configure[noexec] = "1"
-
-do_compile() {
-    export GOBIN="${B}/bin"    
-    rm -rf ${GOBIN} ${B}/pkg
-    mkdir ${GOBIN}
-
-    export TMPDIR=${WORKDIR}/build-tmp
-    mkdir -p ${WORKDIR}/build-tmp
-
-    cd src
-    ./make.bash --host-only
-    # Ensure cgo.a is built with the target toolchain
-    export GOBIN="${B}/target/bin"
-    rm -rf ${GOBIN}
-    mkdir -p ${GOBIN}
-    GO_FLAGS="-a" ./make.bash
-}
-
-do_install() {
-    install -d ${D}${libdir}/go
-    cp -a ${B}/pkg ${D}${libdir}/go/
-    install -d ${D}${libdir}/go/src
-    (cd ${S}/src; for d in *; do \
-        [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
-    done)
-    install -d ${D}${bindir}
-    for f in ${B}/bin/*
-    do
-        install -m755 $f ${D}${bindir}
-    done
-}
-
-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"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.5.bb b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.5.bb
deleted file mode 100644
index 80b5a03..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.5.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-cross.inc
-require go-${PV}.inc
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.6.bb b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.6.bb
deleted file mode 100644
index 80b5a03..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.6.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-cross.inc
-require go-${PV}.inc
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native.inc
deleted file mode 100644
index cb2dd2a..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native.inc
+++ /dev/null
@@ -1,54 +0,0 @@
-inherit native
-
-export GOOS = "${BUILD_GOOS}"
-export GOARCH = "${BUILD_GOARCH}"
-export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go"
-export CGO_ENABLED = "1"
-
-do_configure[noexec] = "1"
-
-do_compile() {
-    export GOBIN="${B}/bin"
-    rm -rf ${GOBIN}
-    mkdir ${GOBIN}
-
-    export TMPDIR=${WORKDIR}/build-tmp
-    mkdir -p ${WORKDIR}/build-tmp
-
-    cd src
-    CGO_ENABLED=0 ./make.bash --host-only
-}
-
-
-make_wrapper() {
-    rm -f ${D}${bindir}/$2
-    cat <<END >${D}${bindir}/$2
-#!/bin/bash
-here=\`dirname \$0\`
-export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
-\$here/../lib/go/bin/$1 "\$@"
-END
-    chmod +x ${D}${bindir}/$2
-}
-
-do_install() {
-    install -d ${D}${libdir}/go
-    cp -a ${B}/pkg ${D}${libdir}/go/
-    install -d ${D}${libdir}/go/src
-    (cd ${S}/src; for d in *; do \
-        [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
-    done)
-    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 $base
-    done
-}
-
-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"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native_1.4.bb b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native_1.4.bb
deleted file mode 100644
index cf186e7..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native_1.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require go-native.inc
-require go-${PV}.inc
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/compose-file_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/compose-file_git.bb
new file mode 100644
index 0000000..bcf8c3d
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/go/compose-file_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Parser for the Compose file format (version 3)"
+HOMEPAGE = "https://github.com/aanand/compose-file"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=9cd86830b557232ce55e2a6b47387471"
+
+SRCNAME = "compose-file"
+
+PKG_NAME = "github.com/aanand/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "a3e58764f50597b6217fec07e9bff7225c4a1719"
+PV = "3.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_compose_file_sysroot_preprocess"
+
+go_compose_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb
index 4f8f431..8524af6 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb
@@ -9,7 +9,8 @@
 PKG_NAME = "github.com/syndtr/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "8e4cdcb3c22b40d5e330ade0b68cb2e2a3cf6f98"
+SRCREV = "2c00daeb6c3b45114c80ac44119e7b8801fdd852"
+PV = "0.0+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-connections_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-connections_git.bb
new file mode 100644
index 0000000..5d071b0
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-connections_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Utility package to work with network connections"
+HOMEPAGE = "https://github.com/docker/connections"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=04424bc6f5a5be60691b9824d65c2ad8"
+
+SRCNAME = "go-connections"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "4ccf312bf1d35e5dbda654e57a9be4c3f3cd0366"
+PV = "0.2.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_connections_sysroot_preprocess"
+
+go_connections_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb
index 092bd50..9b206a1 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb
@@ -2,15 +2,15 @@
 HOMEPAGE = "https://github.com/godbus/dbus"
 SECTION = "devel/go"
 LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b5ac622301483800715d770434e27e5b"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=09042bd5c6c96a2b9e45ddf1bc517eed"
 
 SRCNAME = "dbus"
 
 PKG_NAME = "github.com/godbus/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "88765d85c0fdadcd98a54e30694fa4e4f5b51133"
-PV = "2+git${SRCREV}"
+SRCREV = "5f6efc7ef2759c81b7ba876593971bfce311eab3"
+PV = "4.0.0+git${SRCREV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-distribution-digest_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-distribution-digest_git.bb
deleted file mode 100644
index 2a803da..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-distribution-digest_git.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-DESCRIPTION = "The Docker toolset to pack, ship, store, and deliver content"
-HOMEPAGE = "https://github.com/docker/distribution"
-SECTION = "devel/go"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
-
-SRCNAME = "distribution"
-
-PKG_NAME = "github.com/docker/${SRCNAME}"
-SRC_URI = "git://${PKG_NAME}.git"
-
-SRCREV = "d957768537c5af40e4f4cd96871f7b2bde9e2923"
-
-S = "${WORKDIR}/git"
-
-# NO-OP the do compile rule because this recipe is source only.
-do_compile() {
-}
-
-do_install() {
-	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
-	cp -r ${S}/LICENSE ${S}/digest ${D}${prefix}/local/go/src/${PKG_NAME}/
-}
-
-SYSROOT_PREPROCESS_FUNCS += "go_distribution_digeset_sysroot_preprocess"
-
-go_distribution_digeset_sysroot_preprocess () {
-    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
-    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
-}
-
-FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-distribution_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-distribution_git.bb
new file mode 100644
index 0000000..9e3f209
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-distribution_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "The Docker toolset to pack, ship, store, and deliver content"
+HOMEPAGE = "https://github.com/docker/distribution"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRCNAME = "distribution"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=docker/1.13;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "28602af35aceda2f8d571bad7ca37a54cf0250bc"
+PV = "2.6.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_distribution_digeset_sysroot_preprocess"
+
+go_distribution_digeset_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb
index e18f574..e5bcf14 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb
@@ -9,8 +9,8 @@
 PKG_NAME = "github.com/go-fsnotify/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "ca50e738d35a862c379baf8fffbc3bfd080b3cff"
-PV = "1.0.4+git${SRCREV}"
+SRCREV = "836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6"
+PV = "1.2.11+git${SRCREV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb
index f2acfb4..5565946 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb
@@ -9,7 +9,8 @@
 PKG_NAME = "github.com/docker/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "230dfd18c2326f1e9d08238710e67a1040187d07"
+SRCREV = "9cbd2a1374f46905c68a4eb3694a130610adc62a"
+PV = "0.0+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb
index 082c1a6..5c0c359 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb
@@ -9,8 +9,8 @@
 PKG_NAME = "github.com/Sirupsen/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "3fc34d061b9c78a70db853c7cb6b0576b6d4f32d"
-PV = "0.7.1+git${SRCREV}"
+SRCREV = "d26492970760ca5d33129d2d799e34be5c4782eb"
+PV = "0.11.0+git${SRCREV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb
index 18c188d..8c1e10d 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb
@@ -9,8 +9,8 @@
 PKG_NAME = "github.com/tchap/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "f64d0a63cd3363481c898faa9339de04d12213f9"
-PV = "1.0.1+git${SRCPV}"
+SRCREV = "666120de432aea38ab06bd5c818f04f4129882c9"
+PV = "2.2.6+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb
index 358e6bb..5cbab92 100644
--- a/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb
@@ -9,8 +9,12 @@
 PKG_NAME = "github.com/coreos/go-${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git"
 
-SRCREV = "f743bc15d6bddd23662280b4ad20f7c874cdd5ad"
-PV = "2+git${SRCREV}"
+SRCREV = "b4a58d95188dd092ae20072bac14cece0e67c388"
+PV = "4+git${SRCREV}"
+
+DEPENDS += " \
+    bash \
+"
 
 S = "${WORKDIR}/git"
 
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/grpc-go_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/grpc-go_git.bb
new file mode 100644
index 0000000..48c4249
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/go/grpc-go_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The Go language implementation of gRPC. HTTP/2 based RPC"
+HOMEPAGE = "https://github.com/grpc/grpc-go"
+SECTION = "devel/go"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=a4bad33881612090c6035d8393175996"
+
+SRCNAME = "grpc-go"
+
+PKG_NAME = "google.golang.org/grpc"
+SRC_URI = "git://github.com/grpc/${SRCNAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "777daa17ff9b5daef1cfdf915088a2ada3332bf0"
+PV = "1.4.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_grpc_sysroot_preprocess"
+
+go_grpc_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += " \
+    ${prefix}/local/go/src/${PKG_NAME}/* \
+"
diff --git a/import-layers/meta-virtualization/recipes-devtools/go/notary_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/notary_git.bb
new file mode 100644
index 0000000..d638dc1
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/go/notary_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Notary is a Docker project that allows anyone to have trust over arbitrary collections of data"
+HOMEPAGE = "https://github.com/docker/notary"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=771ddb425ba03c8fab49e5bd9854a4a2"
+
+SRCNAME = "notary"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "c8aa8cf53cbcda2e92def0c9291e25d770493494"
+PV = "0.4.2+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+	install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+	for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+	    if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+	        mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+	    fi
+	    cp $j ${D}${prefix}/local/go/$j
+	done
+	cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_notary_sysroot_preprocess"
+
+go_notary_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf-native_3.0.0.bb b/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf-native_3.0.0.bb
deleted file mode 100644
index 33467b3..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf-native_3.0.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "protobuf"
-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 = "http://code.google.com/p/protobuf/"
-SECTION = "console/tools"
-LICENSE = "BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095"
-
-PR = "r0"
-
-SRC_URI[md5sum] = "d4f6ca65aadc6310b3872ee421e79fa6"
-SRC_URI[sha256sum] = "f5b3563f118f1d3d6e001705fa7082e8fc3bda50038ac3dff787650795734146"
-SRC_URI = "https://github.com/google/protobuf/archive/v3.0.0.tar.gz;downloadfilename=protobuf-3.0.0.tar.gz \
-	"
-
-EXTRA_OECONF += " --with-protoc=echo --disable-shared"
-
-inherit native autotools
-
diff --git a/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf-native_3.1.0.bb b/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf-native_3.1.0.bb
new file mode 100644
index 0000000..c32f627
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf-native_3.1.0.bb
@@ -0,0 +1,19 @@
+SUMMARY = "protobuf"
+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 = "http://code.google.com/p/protobuf/"
+SECTION = "console/tools"
+LICENSE = "BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095"
+
+SRC_URI[md5sum] = "14a532a7538551d5def317bfca41dace"
+SRC_URI[sha256sum] = "0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7"
+SRC_URI = "https://github.com/google/protobuf/archive/v3.1.0.tar.gz;downloadfilename=protobuf-3.1.0.tar.gz \
+	"
+
+EXTRA_OECONF += " --with-protoc=echo"
+
+inherit native autotools
+
diff --git a/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf_3.0.0.bb b/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf_3.1.0.bb
similarity index 91%
rename from import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf_3.0.0.bb
rename to import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf_3.1.0.bb
index fd81fe7..b948e66 100644
--- a/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf_3.0.0.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/protobuf/protobuf_3.1.0.bb
@@ -11,9 +11,9 @@
 PR = "r0"
 EXCLUDE_FROM_WORLD = "1"
 
-SRC_URI[md5sum] = "d4f6ca65aadc6310b3872ee421e79fa6"
-SRC_URI[sha256sum] = "f5b3563f118f1d3d6e001705fa7082e8fc3bda50038ac3dff787650795734146"
-SRC_URI = "https://github.com/google/protobuf/archive/v3.0.0.tar.gz;downloadfilename=protobuf-3.0.0.tar.gz\
+SRC_URI[md5sum] = "14a532a7538551d5def317bfca41dace"
+SRC_URI[sha256sum] = "0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7"
+SRC_URI = "https://github.com/google/protobuf/archive/v3.1.0.tar.gz;downloadfilename=protobuf-3.1.0.tar.gz\
 	        file://protobuf-allow-running-python-scripts-from-anywhere.patch \
 	        file://run-ptest \
             "
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb
index a84a4c4..c279f9f 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb
@@ -15,3 +15,5 @@
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 inherit setuptools
+
+BBCLASSEXTEND = "native"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.3.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.3.1.bb
deleted file mode 100644
index d8cef30..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.3.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "Python documentation generator"
-HOMEPAGE = "http://sphinx-doc.org/"
-SECTION = "devel/python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6dd095eaa1e7a662b279daf80ecad7e6"
-
-PR = "r0"
-SRCNAME = "Sphinx"
-
-SRC_URI = "https://pypi.python.org/packages/source/S/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "8786a194acf9673464c5455b11fd4332"
-SRC_URI[sha256sum] = "1a6e5130c2b42d2de301693c299f78cc4bd3501e78b610c08e45efc70e2b5114"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.4.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.4.1.bb
new file mode 100644
index 0000000..b4ae86b
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.4.1.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Python documentation generator"
+HOMEPAGE = "http://sphinx-doc.org/"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=72f034adc6f7b05b09bc00d1a05bb065"
+
+PR = "r0"
+SRCNAME = "Sphinx"
+
+SRC_URI = "https://pypi.python.org/packages/source/S/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4c4988e0306a04cef8dccc384281e585"
+SRC_URI[sha256sum] = "c6871a784d24aba9270b6b28541537a57e2fcf4d7c799410eba18236bc76d6bc"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.16.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.16.bb
new file mode 100644
index 0000000..5eb60b5
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.16.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \
+application developers the full power and flexibility of SQL"
+HOMEPAGE = "http://www.sqlalchemy.org/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d7dba1721bc8ce05d421f7279cb87971"
+RDEPENDS_${PN} += "python-numbers"
+
+SRCNAME = "SQLAlchemy"
+SRC_URI = "https://pypi.io/packages/source/S/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "42c81726e7e145c206dac46964b4a167"
+SRC_URI[sha256sum] = "e2dfdaa0983931ac1b0522dd637f08a52cf3081746513ac79c50843277ebe463"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.8.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.8.bb
deleted file mode 100644
index 2d66ffd..0000000
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.8.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \
-application developers the full power and flexibility of SQL"
-HOMEPAGE = "http://www.sqlalchemy.org/"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=cf755cb27ad4331d45dbb4db5172fd33"
-RDEPENDS_${PN} += "python-numbers"
-
-SRCNAME = "SQLAlchemy"
-SRC_URI = "https://pypi.python.org/packages/source/S/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "7cfd005be63945c96a78c67764ac3a85"
-SRC_URI[sha256sum] = "950c79c0abf9e9f99c43c627c51d40d14a946810a90c35e7cd827bfd0bffe46f"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
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
new file mode 100644
index 0000000..63caeb4
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.1.5.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \
+application developers the full power and flexibility of SQL"
+HOMEPAGE = "http://www.sqlalchemy.org/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=452f4b8adb0feba42e5be5f1fbfbf538"
+RDEPENDS_${PN} += "python-numbers"
+
+SRCNAME = "SQLAlchemy"
+SRC_URI = "https://pypi.python.org/packages/da/04/8048a5075d6e29235bbd6f1ea092a38dbe2630c670e73d4aa923a4e5521c/${SRCNAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "50685d97dca4b91945ae6309d03ab8c9"
+SRC_URI[sha256sum] = "68fb40049690e567ebda7b270176f5abf0d53d9fbd515fec4e43326f601119b6"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.4.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.6.0.bb
similarity index 75%
rename from import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.4.1.bb
rename to import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.6.0.bb
index e566363..93f2acf 100644
--- a/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.4.1.bb
+++ b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.6.0.bb
@@ -9,8 +9,8 @@
 
 SRC_URI = "https://pypi.python.org/packages/source/W/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
 
-SRC_URI[md5sum] = "a5c6e8ba5431756e6a5d5ec56047ec94"
-SRC_URI[sha256sum] = "12f8b98390befc47336d2c0e5bad9cc48609d808eabb3f8675dc1027a3a9e9db"
+SRC_URI[md5sum] = "089d7fc6745f175737800237c7287802"
+SRC_URI[sha256sum] = "63d262d8f61b516321f786879c9277fa2209f7f57eb47b537eeecfea383d55b7"
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
diff --git a/import-layers/meta-virtualization/recipes-extended/kvmtool/files/0001-Avoid-pointers-for-address-of-packed-members.patch b/import-layers/meta-virtualization/recipes-extended/kvmtool/files/0001-Avoid-pointers-for-address-of-packed-members.patch
new file mode 100644
index 0000000..863e86a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/kvmtool/files/0001-Avoid-pointers-for-address-of-packed-members.patch
@@ -0,0 +1,39 @@
+From 2e22df7c24dadf5e16004cd832cabca76a699d4d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 21 Mar 2017 23:32:39 -0700
+Subject: [PATCH] Avoid pointers for address of packed members
+
+Fixes Clang warning due to -Waddress-of-packed-member
+
+virtio/blk.c:161:37: error: taking address of packed member 'geometry' of class or structure 'virtio_blk_config' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
+        struct virtio_blk_geometry *geo = &conf->geometry;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ virtio/blk.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/virtio/blk.c b/virtio/blk.c
+index c485e4f..1f7365d 100644
+--- a/virtio/blk.c
++++ b/virtio/blk.c
+@@ -158,7 +158,6 @@ static void set_guest_features(struct kvm *kvm, void *dev, u32 features)
+ {
+ 	struct blk_dev *bdev = dev;
+ 	struct virtio_blk_config *conf = &bdev->blk_config;
+-	struct virtio_blk_geometry *geo = &conf->geometry;
+ 
+ 	bdev->features = features;
+ 
+@@ -167,7 +166,7 @@ static void set_guest_features(struct kvm *kvm, void *dev, u32 features)
+ 	conf->seg_max = virtio_host_to_guest_u32(&bdev->vdev, conf->seg_max);
+ 
+ 	/* Geometry */
+-	geo->cylinders = virtio_host_to_guest_u16(&bdev->vdev, geo->cylinders);
++	conf->geometry.cylinders = virtio_host_to_guest_u16(&bdev->vdev, conf->geometry.cylinders);
+ 
+ 	conf->blk_size = virtio_host_to_guest_u32(&bdev->vdev, conf->blk_size);
+ 	conf->min_io_size = virtio_host_to_guest_u16(&bdev->vdev, conf->min_io_size);
+-- 
+2.12.0
+
diff --git a/import-layers/meta-virtualization/recipes-extended/kvmtool/kvmtool.bb b/import-layers/meta-virtualization/recipes-extended/kvmtool/kvmtool.bb
index 3f299dd..b3bf202 100644
--- a/import-layers/meta-virtualization/recipes-extended/kvmtool/kvmtool.bb
+++ b/import-layers/meta-virtualization/recipes-extended/kvmtool/kvmtool.bb
@@ -8,9 +8,10 @@
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git \
            file://external-crosscompiler.patch \
-    "
+           file://0001-Avoid-pointers-for-address-of-packed-members.patch \
+           "
 
-SRCREV = "0093df80d754e1a05b016e5a4ccd4b51a00c562c"
+SRCREV = "3fea89a924511f9f8fe05a892098fad77c1eca0d"
 PV = "3.18.0+git${SRCREV}"
 
 S = "${WORKDIR}/git"
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/0001-Added-configure-variable-for-placing-systemd-untis-l.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/0001-Added-configure-variable-for-placing-systemd-untis-l.patch
new file mode 100644
index 0000000..a64739c
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-1.3.5/0001-Added-configure-variable-for-placing-systemd-untis-l.patch
@@ -0,0 +1,55 @@
+From 531178d7fbb5d4b3404766cfd0fc999398cccd58 Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Wed, 8 Feb 2017 18:39:48 +0200
+Subject: [PATCH] Added configure variable for placing systemd untis location
+
+Upstream-Status: Pending
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ configure.ac       | 3 +++
+ daemon/Makefile.am | 1 -
+ tools/Makefile.am  | 1 -
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0e5b8e3..5a6408c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2687,6 +2687,9 @@ AC_DEFINE_UNQUOTED([isbase64],[libvirt_gl_isbase64],[Hack to avoid symbol clash]
+ AC_DEFINE_UNQUOTED([base64_encode],[libvirt_gl_base64_encode],[Hack to avoid symbol clash])
+ AC_DEFINE_UNQUOTED([base64_encode_alloc],[libvirt_gl_base64_encode_alloc],[Hack to avoid symbol clash])
+ 
++AC_ARG_VAR(SYSTEMD_UNIT_DIR, 'location for systemd units, defautls to /lib/systemd/system')
++AS_IF([test "x$SYSTEMD_UNIT_DIR" = "x"], [SYSTEMD_UNIT_DIR="/lib/systemd/system"])
++
+ AC_CONFIG_FILES([run],
+                 [chmod +x,-w run])
+ AC_CONFIG_FILES([\
+diff --git a/daemon/Makefile.am b/daemon/Makefile.am
+index edb75e8..2ab42a6 100644
+--- a/daemon/Makefile.am
++++ b/daemon/Makefile.am
+@@ -449,7 +449,6 @@ endif ! LIBVIRT_INIT_SCRIPT_UPSTART
+ 
+ if LIBVIRT_INIT_SCRIPT_SYSTEMD
+ 
+-SYSTEMD_UNIT_DIR = /lib/systemd/system
+ BUILT_SOURCES += libvirtd.service
+ 
+ install-init-systemd: install-sysconfig libvirtd.service
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 27ecbf1..8cefe1a 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -380,7 +380,6 @@ libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh
+ 
+ 
+ EXTRA_DIST += libvirt-guests.service.in
+-SYSTEMD_UNIT_DIR = /lib/systemd/system
+ 
+ if LIBVIRT_INIT_SCRIPT_SYSTEMD
+ install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-python.inc b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-python.inc
index bc2f1de..15aa804 100644
--- a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-python.inc
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt-python.inc
@@ -32,7 +32,7 @@
     --install-data=${datadir}"
 
 python __anonymous () {
-    pkgconfig = d.getVar('PACKAGECONFIG', True)
+    pkgconfig = d.getVar('PACKAGECONFIG')
     if ('python') in pkgconfig.split():
         d.setVar('LIBVIRT_PYTHON_ENABLE', '1')
     else:
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 fad5632..19b7567 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,8 @@
 SECTION = "console/tools"
 
 DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
-	   iptables dnsmasq readline libtasn1 libxslt-native"
+	   iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper \
+	   ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)}"
 
 # libvirt-guests.sh needs gettext.sh
 #
@@ -37,6 +38,7 @@
            file://0001-qemu-Let-empty-default-VNC-password-work-as-document.patch \
            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 \
           "
 
 SRC_URI[libvirt.md5sum] = "f9dc1e63d559eca50ae0ee798a4c6c6d"
@@ -117,7 +119,8 @@
 FILES_${PN}-virsh = "${bindir}/virsh"
 FILES_${PN} += "${libdir}/libvirt/connection-driver \
 	    ${datadir}/augeas \
-	    ${datadir}/polkit-1"
+	    ${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \
+	    "
 
 FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug"
 FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a"
@@ -208,6 +211,7 @@
 PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse,"
 PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
 PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng,"
+PACKAGECONFIG[wireshark] = "--with-wireshark-dissector,--without-wireshark-dissector,wireshark libwsutil,"
 
 # Enable the Python tool support
 require libvirt-python.inc
@@ -250,6 +254,15 @@
 	echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \
 	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
 
+	# Manually set permissions and ownership to match polkit recipe
+	if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
+		install -d -m 0700 ${D}/${datadir}/polkit-1/rules.d
+		chown polkitd ${D}/${datadir}/polkit-1/rules.d
+		chgrp root ${D}/${datadir}/polkit-1/rules.d
+	else
+		rm -rf ${D}/${datadir}/polkit-1
+	fi
+
 	# Add hook support for libvirt
 	mkdir -p ${D}/etc/libvirt/hooks
 
@@ -263,7 +276,7 @@
     --with-init-script=systemd \
     "
 
-EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH}"
+EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH} SYSTEMD_UNIT_DIR=${systemd_system_unitdir}"
 
 do_compile_ptest() {
 	oe_runmake -C tests buildtest-TESTS
diff --git a/import-layers/meta-virtualization/recipes-extended/seabios/seabios_1.9.1.bb b/import-layers/meta-virtualization/recipes-extended/seabios/seabios_1.9.1.bb
index 88f2963..5c095ac 100644
--- a/import-layers/meta-virtualization/recipes-extended/seabios/seabios_1.9.1.bb
+++ b/import-layers/meta-virtualization/recipes-extended/seabios/seabios_1.9.1.bb
@@ -23,6 +23,8 @@
 EXTRA_OEMAKE += "HOSTCC='${BUILD_CC}'"
 EXTRA_OEMAKE += "CROSS_PREFIX=${TARGET_PREFIX}"
 
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
+
 do_configure() {
     oe_runmake defconfig
 }
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen-arch.inc b/import-layers/meta-virtualization/recipes-extended/xen/xen-arch.inc
index 844d47d..fb0093e 100644
--- a/import-layers/meta-virtualization/recipes-extended/xen/xen-arch.inc
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen-arch.inc
@@ -6,7 +6,7 @@
 
 def map_xen_arch(a, d):
     import re
-    valid_archs = d.getVar('valid_xen_archs', True).split()
+    valid_archs = d.getVar('valid_xen_archs').split()
 
     if   re.match("i.86", a):        return "x86_32"
     elif re.match("x86.64", a):      return "x86_64"
diff --git a/import-layers/meta-virtualization/recipes-extended/xen/xen.inc b/import-layers/meta-virtualization/recipes-extended/xen/xen.inc
index b5c5f03..37fb4ce 100644
--- a/import-layers/meta-virtualization/recipes-extended/xen/xen.inc
+++ b/import-layers/meta-virtualization/recipes-extended/xen/xen.inc
@@ -7,7 +7,7 @@
 
 COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux'
 
-inherit autotools-brokensep gettext setuptools update-rc.d systemd deploy
+inherit autotools-brokensep setuptools update-rc.d systemd deploy
 
 require xen-arch.inc
 
@@ -22,14 +22,16 @@
 PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl,"
 PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
 PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
-PACKAGECONFIG[hvm] = "--with-system-seabios="${STAGING_DIR_HOST}/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios,"
+PACKAGECONFIG[hvm] = "--with-system-seabios="/usr/share/firmware/bios.bin",--disable-seabios,seabios ipxe vgabios,"
 
 DEPENDS = " \
     bison-native \
     dev86-native \
     flex-native \
     file-native \
+    gettext-native \
     iasl-native \
+    ncurses-native \
     util-linux-native \
     xz-native \
     bridge-utils \
@@ -178,6 +180,8 @@
     ${PN}-libxencall-dev \
     ${PN}-libxenctrl \
     ${PN}-libxenctrl-dev \
+    ${PN}-libxendevicemodel \
+    ${PN}-libxendevicemodel-dev \
     ${PN}-libxenevtchn \
     ${PN}-libxenevtchn-dev \
     ${PN}-libxenforeignmemory \
@@ -275,25 +279,52 @@
     "
 
 FILES_${PN}-libblktapctl = "${libdir}/libblktapctl.so.*"
-FILES_${PN}-libblktapctl-dev = "${libdir}/libblktapctl.so"
+FILES_${PN}-libblktapctl-dev = " \
+    ${libdir}/libblktapctl.so \
+    ${datadir}/pkgconfig/xenblktapctl.pc \
+    "
 
 FILES_${PN}-libxencall = "${libdir}/libxencall.so.*"
-FILES_${PN}-libxencall-dev = "${libdir}/libxencall.so"
+FILES_${PN}-libxencall-dev = " \
+    ${libdir}/libxencall.so \
+    ${datadir}/pkgconfig/xencall.pc \
+    "
 
 FILES_${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
-FILES_${PN}-libxenctrl-dev = "${libdir}/libxenctrl.so"
+FILES_${PN}-libxenctrl-dev = " \
+    ${libdir}/libxenctrl.so \
+    ${datadir}/pkgconfig/xencontrol.pc \
+    "
+
+FILES_${PN}-libxendevicemodel = "${libdir}/libxendevicemodel.so.*"
+FILES_${PN}-libxendevicemodel-dev = " \
+    ${libdir}/libxendevicemodel.so \
+    ${datadir}/pkgconfig/xendevicemodel.pc \
+    "
 
 FILES_${PN}-libxenevtchn = "${libdir}/libxenevtchn.so.*"
-FILES_${PN}-libxenevtchn-dev = "${libdir}/libxenevtchn.so"
+FILES_${PN}-libxenevtchn-dev = " \
+    ${libdir}/libxenevtchn.so \
+    ${datadir}/pkgconfig/xenevtchn.pc \
+    "
 
 FILES_${PN}-libxenforeignmemory = "${libdir}/libxenforeignmemory.so.*"
-FILES_${PN}-libxenforeignmemory-dev = "${libdir}/libxenforeignmemory.so"
+FILES_${PN}-libxenforeignmemory-dev = " \
+    ${libdir}/libxenforeignmemory.so \
+    ${datadir}/pkgconfig/xenforeignmemory.pc \
+    "
 
 FILES_${PN}-libxengnttab = "${libdir}/libxengnttab.so.*"
-FILES_${PN}-libxengnttab-dev = "${libdir}/libxengnttab.so"
+FILES_${PN}-libxengnttab-dev = " \
+    ${libdir}/libxengnttab.so \
+    ${datadir}/pkgconfig/xengnttab.pc \
+    "
 
 FILES_${PN}-libxenguest = "${libdir}/libxenguest.so.*"
-FILES_${PN}-libxenguest-dev = "${libdir}/libxenguest.so"
+FILES_${PN}-libxenguest-dev = " \
+    ${libdir}/libxenguest.so \
+    ${datadir}/pkgconfig/xenguest.pc \
+    "
 
 FILES_${PN}-libxenlight = "${libdir}/libxenlight.so.*"
 FILES_${PN}-libxenlight-dev = " \
@@ -302,16 +333,28 @@
     "
 
 FILES_${PN}-libxenstat = "${libdir}/libxenstat.so.*"
-FILES_${PN}-libxenstat-dev = "${libdir}/libxenstat.so"
+FILES_${PN}-libxenstat-dev = " \
+    ${libdir}/libxenstat.so \
+    ${datadir}/pkgconfig/xenstat.pc \
+    "
 
 FILES_${PN}-libxenstore = "${libdir}/libxenstore.so.*"
-FILES_${PN}-libxenstore-dev = "${libdir}/libxenstore.so"
+FILES_${PN}-libxenstore-dev = " \
+    ${libdir}/libxenstore.so \
+    ${datadir}/pkgconfig/xenstore.pc \
+    "
 
 FILES_${PN}-libxentoollog = "${libdir}/libxentoollog.so.*"
-FILES_${PN}-libxentoollog-dev = "${libdir}/libxentoollog.so"
+FILES_${PN}-libxentoollog-dev = " \
+    ${libdir}/libxentoollog.so \
+    ${datadir}/pkgconfig/xentoollog.pc \
+    "
 
 FILES_${PN}-libxenvchan = "${libdir}/libxenvchan.so.*"
-FILES_${PN}-libxenvchan-dev = "${libdir}/libxenvchan.so"
+FILES_${PN}-libxenvchan-dev = " \
+    ${libdir}/libxenvchan.so \
+    ${datadir}/pkgconfig/xenvchan.pc \
+    "
 
 FILES_${PN}-libxlutil = "${libdir}/libxlutil.so.*"
 FILES_${PN}-libxlutil-dev = " \
@@ -319,13 +362,22 @@
     ${datadir}/pkgconfig/xlutil.pc \
     "
 FILES_${PN}-libvhd = "${libdir}/libvhd.so.*"
-FILES_${PN}-libvhd-dev = "${libdir}/libvhd.so"
+FILES_${PN}-libvhd-dev = " \
+    ${libdir}/libvhd.so \
+    ${datadir}/pkgconfig/vhd.pc \
+    "
 
 FILES_${PN}-libblktap = "${libdir}/libblktap.so.*"
-FILES_${PN}-libblktap-dev = "${libdir}/libblktap.so"
+FILES_${PN}-libblktap-dev = " \
+    ${libdir}/libblktap.so \
+    ${datadir}/pkgconfig/blktap.pc \
+    "
 
 FILES_${PN}-libfsimage = "${libdir}/libfsimage.so.*"
-FILES_${PN}-libfsimage-dev = "${libdir}/libfsimage.so"
+FILES_${PN}-libfsimage-dev = " \
+    ${libdir}/libfsimage.so \
+    ${datadir}/pkgconfig/fsimage.pc \
+    "
 
 FILES_${PN}-fsimage = "${libdir}/fs/*/*fsimage.so"
 
@@ -720,7 +772,7 @@
 
 # systemd packages
 SYSTEMD_PACKAGES = "${PN}-xen-watchdog ${PN}-xencommons ${PN}-xendomains"
-SYSTEMD_SERVICE_${PN}-watchdog = "xen-watchdog.service"
+SYSTEMD_SERVICE_${PN}-xen-watchdog = "xen-watchdog.service"
 SYSTEMD_SERVICE_${PN}-xencommons = " \
     proc-xen.mount \
     var-lib-xenstored.mount \
@@ -740,12 +792,12 @@
 export STAGING_LIBDIR
 
 # specify xen hypervisor to build/target
-export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH', True), d)}"
-export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH', True), d)}"
+export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH'), d)}"
+export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH'), d)}"
 
 python () {
-    if d.getVar('XEN_TARGET_ARCH', True) == 'INVALID':
-        raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH', True))
+    if d.getVar('XEN_TARGET_ARCH') == 'INVALID':
+        raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH'))
 }
 
 # Yocto appends ${PN} to libexecdir by default and Xen appends 'xen' as well
@@ -805,7 +857,7 @@
 
 # check for XSM in package config to allow XSM_ENABLE to be set
 python () {
-    pkgconfig = d.getVar('PACKAGECONFIG', True)
+    pkgconfig = d.getVar('PACKAGECONFIG')
     if ('xsm') in pkgconfig.split():
         d.setVar('XSM_ENABLED', '1')
     else:
@@ -953,3 +1005,37 @@
 }
 
 addtask deploy after do_populate_sysroot
+
+# Enable use of menuconfig directly from bitbake and also within the devshell
+OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO"
+HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
+HOSTLDFLAGS = "${BUILD_LDFLAGS}"
+TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
+do_devshell[depends] += "ncurses-native:do_populate_sysroot"
+
+KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+python do_menuconfig() {
+    import shutil
+
+    try:
+        mtime = os.path.getmtime("xen/.config")
+        shutil.copy("xen/.config", "xen/.config.orig")
+    except OSError:
+        mtime = 0
+
+    oe_terminal("${SHELL} -c \"cd xen; XEN_CONFIG_EXPERT=y make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
+        d.getVar('PN') + ' Configuration', d)
+
+    try:
+        newmtime = os.path.getmtime("xen/.config")
+    except OSError:
+        newmtime = 0
+
+    if newmtime > mtime:
+        bb.note("Configuration changed, recompile will be forced")
+        bb.build.write_taint('do_compile', d)
+}
+do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
+do_menuconfig[nostamp] = "1"
+do_menuconfig[dirs] = "${B}"
+addtask menuconfig after do_configure
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend
similarity index 100%
rename from import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.8.bbappend
rename to import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.10.bbappend
diff --git a/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.8.bbappend b/import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
similarity index 100%
copy from import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.8.bbappend
copy to import-layers/meta-virtualization/recipes-kernel/linux/linux-yocto_4.9.bbappend
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 073022e..641d55f 100644
--- a/import-layers/meta-virtualization/recipes-networking/netns/netns_git.bb
+++ b/import-layers/meta-virtualization/recipes-networking/netns/netns_git.bb
@@ -2,19 +2,19 @@
 SUMMARY = "Runc hook for setting up default bridge networking."
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
-DEPENDS = "go-cross"
 
-SRC_URI = "git://github.com/jfrazelle/netns;branch=master"
-SRCREV = "2804050eeab661bfa75c3aa06bdcf60273b02ca7"
+SRC_URI = "git://github.com/jessfraz/netns;branch=master"
+SRCREV = "85b1ab9fcccbaa404a2636b52a48bbde02437cf7"
 PV = "0.1.0+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-inherit go-osarchmap
+inherit goarch
+inherit go
 
 do_compile() {
 	export GOARCH="${TARGET_GOARCH}"
-
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	# Setup vendor directory so that it can be used in GOPATH.
 	#
 	# Go looks in a src directory under any directory in GOPATH but netns
@@ -23,8 +23,8 @@
 	# We also need to link in the ipallocator directory as that is not under
 	# a src directory.
 	ln -sfn . "${S}/vendor/src"
-	mkdir -p "${S}/vendor/src/github.com/jfrazelle/netns"
-	ln -sfn "${S}/ipallocator" "${S}/vendor/src/github.com/jfrazelle/netns/ipallocator"
+	mkdir -p "${S}/vendor/src/github.com/jessfraz/netns"
+	ln -sfn "${S}/ipallocator" "${S}/vendor/src/github.com/jessfraz/netns/ipallocator"
 	export GOPATH="${S}/vendor"
 
 	# Pass the needed cflags/ldflags so that cgo
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch
deleted file mode 100644
index 2b87a11..0000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-more-target-python-substitutions.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From d1ab2f62a03c2c977de6fed5fca8de63e328a870 Mon Sep 17 00:00:00 2001
-Message-Id: <d1ab2f62a03c2c977de6fed5fca8de63e328a870.1391527986.git.Jim.Somerville@windriver.com>
-From: Jim Somerville <Jim.Somerville@windriver.com>
-Date: Tue, 4 Feb 2014 15:30:41 +0000
-Subject: [PATCH 1/1] openvswitch: add more target python substitutions
-
-The TARGET_PYTHON variable is used for script
-substitutions to ensure the scripts will be able to properly execute
-if the target system has a different path for the python.
-
-Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
----
- ovsdb/ovsdb-dot.in         | 2 +-
- ovsdb/ovsdb-idlc.in        | 2 +-
- utilities/ovs-dpctl-top.in | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in
-index 85c126d..402a77c 100755
---- a/ovsdb/ovsdb-dot.in
-+++ b/ovsdb/ovsdb-dot.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- 
- from datetime import date
- import ovs.db.error
-diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
-index ec1c655..f5c135f 100755
---- a/ovsdb/ovsdb-idlc.in
-+++ b/ovsdb/ovsdb-idlc.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- 
- import getopt
- import os
-diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in
-index f43fdeb..8475118 100755
---- a/utilities/ovs-dpctl-top.in
-+++ b/utilities/ovs-dpctl-top.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Copyright (c) 2013 Nicira, Inc.
- #
--- 
-1.8.3.4
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
deleted file mode 100644
index 98224b4..0000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 569ac1066cd3046b8ac899153df9f07908d45145 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Fri, 21 Jun 2013 11:16:00 -0400
-Subject: [PATCH] openvswitch: add target perl handling
-
-Allow the build to specify a path for the perl instead of reusing
-the PERL variable which can lead to inconsistencies if we are cross
-compiling. The TARGET_PERL variable will be used for script
-substitutions to ensure the scripts will be able to properly execute
-if the target system has a different path for the perl.
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- Makefile.am                  | 1 +
- configure.ac                 | 7 +++++++
- utilities/ovs-parse-leaks.in | 2 +-
- 3 files changed, 9 insertions(+), 1 deletion(-)
-
-Index: openvswitch-2.0.0/Makefile.am
-===================================================================
---- openvswitch-2.0.0.orig/Makefile.am
-+++ openvswitch-2.0.0/Makefile.am
-@@ -114,6 +114,7 @@
-                 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
-                 -e 's,[@]DBDIR[@],$(DBDIR),g' \
-                 -e 's,[@]PERL[@],$(PERL),g' \
-+                -e 's,[@]TARGET_PERL[@],$(TARGET_PERL),g' \
-                 -e 's,[@]PYTHON[@],$(PYTHON),g' \
-                 -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
-                 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
-Index: openvswitch-2.0.0/configure.ac
-===================================================================
---- openvswitch-2.0.0.orig/configure.ac
-+++ openvswitch-2.0.0/configure.ac
-@@ -115,6 +115,13 @@
- AC_SUBST(KARCH)
- OVS_CHECK_LINUX
- 
-+if test "$TARGET_PERL"; then
-+    TARGET_PERL=$TARGET_PERL
-+else
-+    TARGET_PERL=$PERL
-+fi
-+AC_SUBST(TARGET_PERL)
-+
- if test "$TARGET_PYTHON"; then
-     TARGET_PYTHON=$TARGET_PYTHON
- else
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch
deleted file mode 100644
index 97b352c..0000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From e8a5d34885c5fdba7d951fb1bb85131cbafca432 Mon Sep 17 00:00:00 2001
-From: Mark Asselstine <mark.asselstine@windriver.com>
-Date: Wed, 19 Jun 2013 17:25:56 -0400
-Subject: [PATCH] openvswitch: add target python handling
-
-Allow the build to specify a path for the python instead of reusing
-the PYTHON variable which can lead to inconsistencies if we are cross
-compiling. The TARGET_PYTHON variable will be used for script
-substitutions to ensure the scripts will be able to properly execute
-if the target system has a different path for the python.
-
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- Makefile.am                        | 1 +
- configure.ac                       | 7 +++++++
- ovsdb/ovsdbmonitor/ovsdbmonitor.in | 2 +-
- utilities/bugtool/ovs-bugtool.in   | 2 +-
- utilities/ovs-check-dead-ifs.in    | 2 +-
- utilities/ovs-l3ping.in            | 2 +-
- utilities/ovs-parse-backtrace.in   | 2 +-
- utilities/ovs-pcap.in              | 2 +-
- utilities/ovs-tcpundump.in         | 2 +-
- utilities/ovs-test.in              | 2 +-
- utilities/ovs-vlan-test.in         | 2 +-
- 11 files changed, 17 insertions(+), 9 deletions(-)
-
-Index: openvswitch-2.1.2/Makefile.am
-===================================================================
---- openvswitch-2.1.2.orig/Makefile.am
-+++ openvswitch-2.1.2/Makefile.am
-@@ -125,6 +125,7 @@
-                 -e 's,[@]DBDIR[@],$(DBDIR),g' \
-                 -e 's,[@]PERL[@],$(PERL),g' \
-                 -e 's,[@]PYTHON[@],$(PYTHON),g' \
-+                -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
-                 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
-                 -e 's,[@]VERSION[@],$(VERSION),g' \
-                 -e 's,[@]localstatedir[@],$(localstatedir),g' \
-Index: openvswitch-2.1.2/configure.ac
-===================================================================
---- openvswitch-2.1.2.orig/configure.ac
-+++ openvswitch-2.1.2/configure.ac
-@@ -118,6 +118,13 @@
- AC_SUBST(KARCH)
- OVS_CHECK_LINUX
- 
-+if test "$TARGET_PYTHON"; then
-+    TARGET_PYTHON=$TARGET_PYTHON
-+else
-+    TARGET_PYTHON=$PYTHON
-+fi
-+AC_SUBST(TARGET_PYTHON)
-+
- AC_CONFIG_FILES(Makefile)
- AC_CONFIG_FILES(datapath/Makefile)
- AC_CONFIG_FILES(datapath/linux/Kbuild)
-Index: openvswitch-2.1.2/utilities/bugtool/ovs-bugtool.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/bugtool/ovs-bugtool.in
-+++ openvswitch-2.1.2/utilities/bugtool/ovs-bugtool.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- 
- # 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
-Index: openvswitch-2.1.2/utilities/ovs-check-dead-ifs.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-check-dead-ifs.in
-+++ openvswitch-2.1.2/utilities/ovs-check-dead-ifs.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- 
- import os
- import re
-Index: openvswitch-2.1.2/utilities/ovs-l3ping.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-l3ping.in
-+++ openvswitch-2.1.2/utilities/ovs-l3ping.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
-Index: openvswitch-2.1.2/utilities/ovs-parse-backtrace.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-parse-backtrace.in
-+++ openvswitch-2.1.2/utilities/ovs-parse-backtrace.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Copyright (c) 2012 Nicira, Inc.
- #
-Index: openvswitch-2.1.2/utilities/ovs-pcap.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-pcap.in
-+++ openvswitch-2.1.2/utilities/ovs-pcap.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Copyright (c) 2010 Nicira, Inc.
- #
-Index: openvswitch-2.1.2/utilities/ovs-tcpundump.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-tcpundump.in
-+++ openvswitch-2.1.2/utilities/ovs-tcpundump.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Copyright (c) 2010 Nicira, Inc.
- #
-Index: openvswitch-2.1.2/utilities/ovs-test.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-test.in
-+++ openvswitch-2.1.2/utilities/ovs-test.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
-Index: openvswitch-2.1.2/utilities/ovs-vlan-test.in
-===================================================================
---- openvswitch-2.1.2.orig/utilities/ovs-vlan-test.in
-+++ openvswitch-2.1.2/utilities/ovs-vlan-test.in
-@@ -1,4 +1,4 @@
--#! @PYTHON@
-+#! @TARGET_PYTHON@
- #
- # Copyright (c) 2010 Nicira, Inc.
- #
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
new file mode 100644
index 0000000..68f46ff
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch
@@ -0,0 +1,152 @@
+From 04ad1c3d9f47cfdf4ad9b5d685e953ec094326ff 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
+
+Unfortunately there is no concept of a host python vs. target python
+to facilitate cross compilation. There is only one PYTHON variable and
+this is used during building and in the header of python scripts after
+installation. The best approach for cross compilation is to thus to
+ensure python is in the path and avoid passing a path as part of
+PYTHON. To make this function smoothly all installed scripts should
+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 +-
+ build-aux/extract-ofp-errors             | 2 +-
+ build-aux/extract-ofp-fields             | 2 +-
+ build-aux/extract-ofp-msgs               | 2 +-
+ build-aux/xml2nroff                      | 2 +-
+ ovn/utilities/ovn-docker-overlay-driver  | 2 +-
+ ovn/utilities/ovn-docker-underlay-driver | 2 +-
+ ovsdb/ovsdb-doc                          | 2 +-
+ ovsdb/ovsdb-dot.in                       | 2 +-
+ ovsdb/ovsdb-idlc.in                      | 2 +-
+ utilities/bugtool/ovs-bugtool.in         | 2 +-
+ 12 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/build-aux/check-structs b/build-aux/check-structs
+index f79f235..c7b8730 100755
+--- a/build-aux/check-structs
++++ b/build-aux/check-structs
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ import os.path
+ import sys
+diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
+index 184447b..92ea18d 100755
+--- a/build-aux/extract-ofp-actions
++++ b/build-aux/extract-ofp-actions
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ import sys
+ import os.path
+diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
+index 9642593..11e6de7 100755
+--- a/build-aux/extract-ofp-errors
++++ b/build-aux/extract-ofp-errors
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ import sys
+ import os.path
+diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
+index 498b887..5d6bcec 100755
+--- a/build-aux/extract-ofp-fields
++++ b/build-aux/extract-ofp-fields
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ import getopt
+ import sys
+diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs
+index 1813638..e9e3c25 100755
+--- a/build-aux/extract-ofp-msgs
++++ b/build-aux/extract-ofp-msgs
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ import sys
+ import os.path
+diff --git a/build-aux/xml2nroff b/build-aux/xml2nroff
+index bd4e879..9d81503 100755
+--- a/build-aux/xml2nroff
++++ b/build-aux/xml2nroff
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ # 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
+--- a/ovn/utilities/ovn-docker-overlay-driver
++++ b/ovn/utilities/ovn-docker-overlay-driver
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ # Copyright (C) 2015 Nicira, Inc.
+ #
+ # 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
+--- a/ovn/utilities/ovn-docker-underlay-driver
++++ b/ovn/utilities/ovn-docker-underlay-driver
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ # Copyright (C) 2015 Nicira, Inc.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
+index 5cf26ee..f76f4bd 100755
+--- a/ovsdb/ovsdb-doc
++++ b/ovsdb/ovsdb-doc
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python
++#! /usr/bin/env python
+ 
+ # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+ #
+diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in
+index 134ce22..893c408 100755
+--- a/ovsdb/ovsdb-dot.in
++++ b/ovsdb/ovsdb-dot.in
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! /usr/bin/env @PYTHON@
+ 
+ from datetime import date
+ import ovs.db.error
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 721ab50..bfbcf23 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! /usr/bin/env @PYTHON@
+ 
+ import getopt
+ import os
+diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
+index 963c50c..c84d7c2 100755
+--- a/utilities/bugtool/ovs-bugtool.in
++++ b/utilities/bugtool/ovs-bugtool.in
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! /usr/bin/env @PYTHON@
+ 
+ # 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/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch
similarity index 95%
rename from import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch
rename to import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch
index 7e74044..47c81dd 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-8c0b419a0b9ac0141d6973dcc80306dfc6a83d31.patch
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch
@@ -1,4 +1,4 @@
-From e20556d7cf0fc8258db77c1f3e0a160cf9fd4514 Mon Sep 17 00:00:00 2001
+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
@@ -19,13 +19,13 @@
  create mode 100644 test.mk
 
 diff --git a/Makefile.am b/Makefile.am
-index ed43c2f..f38d278 100644
+index a4dd7b8..0bd32c7 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -401,3 +401,4 @@ include datapath-windows/include/automake.mk
- include windows/automake.mk
+@@ -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
@@ -106,5 +106,5 @@
 +	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
 -- 
-1.9.1
+2.7.4
 
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-ptest-Fix-python-path.patch b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-ptest-Fix-python-path.patch
deleted file mode 100644
index c75ebc5..0000000
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch-git/openvswitch-ptest-Fix-python-path.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 2a78bddb865e0d3377f437428ed6825195af0a14 Mon Sep 17 00:00:00 2001
-From: He Zhe <zhe.he@windriver.com>
-Date: Wed, 13 Apr 2016 03:13:01 -0400
-Subject: [PATCH] openvswitch: ptest: Fix python path
-
-For now PYTHON just happens to be the same as TARGET_PYTHON so we get the right
-python binary. This patch sets PYTHON to TARGET_PYTHON since ptest is going to
-be run on target.
-
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- tests/atlocal.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/atlocal.in b/tests/atlocal.in
-index 5815c6c..db2d2c9 100644
---- a/tests/atlocal.in
-+++ b/tests/atlocal.in
-@@ -5,7 +5,7 @@ EGREP='@EGREP@'
- PERL='@PERL@'
- 
- if test x"$PYTHON" = x; then
--    PYTHON='@PYTHON@'
-+    PYTHON='@TARGET_PYTHON@'
- fi
- 
- PYTHONPATH=$abs_top_srcdir/python:$abs_top_builddir/tests:$PYTHONPATH
--- 
-1.9.1
-
diff --git a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc
index 3c70703..1f0b52b 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch.inc
@@ -11,11 +11,11 @@
 SECTION = "networking"
 LICENSE = "Apache-2"
 
-DEPENDS += "bridge-utils openssl python perl"
+DEPENDS += "bridge-utils openssl python perl python-six-native coreutils-native"
 
 RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
 	python perl perl-module-strict ${PN}-switch \
-        bash python-twisted"
+        bash python-twisted python-six"
 RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki"
 RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
 RDEPENDS_${PN}-pki = "${PN}"
@@ -31,13 +31,12 @@
 	file://openvswitch-switch-setup \
 	file://openvswitch-testcontroller \
 	file://openvswitch-testcontroller-setup \
-	file://openvswitch-add-target-python-handling.patch \
-	file://openvswitch-add-target-perl-handling.patch \
 	"
 
 EXTRA_OECONF += "\
-	TARGET_PYTHON=${bindir}/python \
-	TARGET_PERL=${bindir}/perl \
+	PYTHON=python \
+	PYTHON3=python3 \
+	PERL=${bindir}/perl \
 	"
 CONFIGUREOPT_DEPTRACK = ""
 
@@ -61,8 +60,9 @@
 FILES_${PN}-switch = "\
 	${sysconfdir}/init.d/openvswitch-switch \
 	${sysconfdir}/default/openvswitch-switch \
+	${systemd_unitdir}/system/ovs-vswitchd.service \
 	${systemd_unitdir}/system/openvswitch.service \
-	${systemd_unitdir}/system/openvswitch-nonetwork.service \
+	${systemd_unitdir}/system/ovsdb-server.service \
 	"
 
 # silence a warning
@@ -70,12 +70,13 @@
 FILES_${PN} += "/run"
 
 FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/"
-inherit autotools update-rc.d systemd python-dir
+inherit autotools update-rc.d systemd pythonnative
 
 SYSTEMD_PACKAGES = "${PN}-switch"
 SYSTEMD_SERVICE_${PN}-switch = " \
-    openvswitch-nonetwork.service \
-    openvswitch-switch.service \
+    ovsdb-server.service \
+    ovs-vswitchd.service \
+    openvswitch.service \
 "
 
 INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-testcontroller"
@@ -97,10 +98,12 @@
 	true || rm -fr ${D}/${datadir}/${PN}/pki
 
 	install -d ${D}/${systemd_unitdir}/system/
+	install -m 644 ${S}/rhel/usr_lib_systemd_system_ovs-vswitchd.service \
+		${D}/${systemd_unitdir}/system/ovs-vswitchd.service
 	install -m 644 ${S}/rhel/usr_lib_systemd_system_openvswitch.service \
-		${D}/${systemd_unitdir}/system/openvswitch-switch.service
-	install -m 644 ${S}/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
-		${D}/${systemd_unitdir}/system/openvswitch-nonetwork.service
+		${D}/${systemd_unitdir}/system/openvswitch.service
+	install -m 644 ${S}/rhel/usr_lib_systemd_system_ovsdb-server.service \
+		${D}/${systemd_unitdir}/system/ovsdb-server.service
 
 	oe_runmake modules_install INSTALL_MOD_PATH=${D}
 	install -d ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages
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 5ecb29a..1fb82ae 100644
--- a/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/import-layers/meta-virtualization/recipes-networking/openvswitch/openvswitch_git.bb
@@ -12,24 +12,26 @@
 	"
 
 S = "${WORKDIR}/git"
-PV = "2.5.0+${SRCREV}"
+PV = "2.7.0+${SRCREV}"
 
 FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:"
 
-SRCREV = "8c0b419a0b9ac0141d6973dcc80306dfc6a83d31"
-SRC_URI += "\
-	git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.5 \
-	file://openvswitch-add-more-target-python-substitutions.patch \
-	file://openvswitch-add-ptest-${SRCREV}.patch \
-	file://run-ptest \
-	file://disable_m4_check.patch \
-	file://kernel_module.patch \
-	file://openvswitch-ptest-Fix-python-path.patch \
-	file://0001-use-the-linux-if_packet.h-Interface-directly.patch \
-	file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \
-	"
+SRCREV = "c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1"
+SRC_URI = "file://openvswitch-switch \
+           file://openvswitch-switch-setup \
+           file://openvswitch-testcontroller \
+           file://openvswitch-testcontroller-setup \
+           git://github.com/openvswitch/ovs.git;protocol=git;branch=branch-2.7 \
+           file://openvswitch-add-ptest-${SRCREV}.patch \
+           file://run-ptest \
+           file://disable_m4_check.patch \
+           file://kernel_module.patch \
+           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 \
+           "
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=247d8817aece26b21a8cd6791b3ea994"
+LIC_FILES_CHKSUM = "file://COPYING;md5=17b2c9d4c70853a09c0e143137754b35"
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}/opt/dpdk/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,"