subtree updates

poky: 67266331b0..835f7eac06:
  Adrian Bunk (9):
        valgrind: Remove dependency on libx11
        bluez5: Remove obsolete dependency on dbus-glib
        python3-dbus: Remove obsolete dependency on dbus-glib
        cups: Remove unnecessary dependency on dbus-glib
        libnotify: Remove obsolete dependency on dbus-glib
        unfs3: Switch to new upstream location
        i2c-tools: Add alternative for i2ctransfer
        meta: Remove remnants of bluez4 support
        e2fsprogs: Remove patch that disabled 64bit for ext4 by default

  Adrian Freihofer (1):
        yocto-bsp: runqemu runs beaglebone-yocto

  Adrian Ratiu (1):
        opkg/package/rootfs_ipk: allow overwriting OPKGLIBDIR

  Alejandro del Castillo (1):
        opkg: upgrade to version 0.4.1

  Alexander Kanavin (3):
        rt-tests: exclude 1.4 version from upstream check as well
        gtk-doc: correct the style.css permissions
        mobile-broadband-provider-info: upgrade 20190116 -> 20190618

  Alistair Francis (7):
        mesa: Add support for the lima PACKAGECONFIG
        u-boot: Update to 2019.07
        packagegroup-core-sdk: Set blank sanitiser for RISC-V 32
        opensbi: Update from 0.3 to 0.4
        opensbi: Fix installed-vs-shipped warning
        qemurunner.py: Be more verbose about problems
        package_manager: Ensure the base-feed directory exists

  Andrej Valek (2):
        busybox: 1.30.1 -> 1.31.0
        oe/copy_buildsystem: move layer into layers directory

  Anuj Mittal (25):
        gstreamer1.0-plugins-bad: depend on vulkan-loader now
        vulkan-demos: depend on vulkan-loader
        vulkan: remove
        binutils: fix CVE-2019-12972 CVE-2019-9071
        gnupg: upgrade 2.2.16 -> 2.2.17
        libxslt: fix CVE-2019-13117 CVE-2019-13118
        libva: upgrade 2.4.1 -> 2.5.0
        libva-utils: upgrade 2.4.0 -> 2.5.0
        nasm: fix CVE-2018-19755
        python: fix CVE-2019-9740
        python3: upgrade 3.7.3 -> 3.7.4
        binutils: CVE-2019-9070 is same as CVE-2019-9071
        qemu: fix CVE-2019-12155
        bzip2: upgrade 1.0.7 -> 1.0.8
        glib-2.0: upgrade 2.60.4 -> 2.60.5
        vte: upgrade 0.56.1 -> 0.56.3
        openssl: set CVE vendor to openssl
        curl: upgrade 7.65.1 -> 7.65.2
        rsync: fix CVEs for included zlib
        glibc: CVE-2018-20796 is same as CVE-2019-9169
        unzip: fix CVE-2019-13232
        python: include CVE patches for python-native as well
        gdb: fix CVE-2017-9778
        iptables: upgrade 1.8.2 -> 1.8.3
        piglit: fix SRC_URI

  Armin Kuster (1):
        timezone: update to 2019b

  Bonnans, Laurent (1):
        openssl: fix valgrind errors on v1.1.1c

  Bruce Ashfield (5):
        linux-yocto/5.0: bsp: add basic xilinx zynqmp support
        linux-yocto/5.0: make scsi-debug include scsi core configs
        linux-yocto: bsp/beaglebone: support qemu -machine virt
        linux-yocto/4.19: update to 4.19.57 and -rt22
        package: check PKG_ variables before executing ontarget postinst

  CHerzig@Gauselmann.de (1):
        bitbake: fetch2/clearcase: Fix class import errors

  Changqing Li (5):
        quilt: run-ptest remove Interactive Input
        mdadm: fix systemd service start up failure
        mdam: fix mdmonitor start up failure
        opkg: make ptest output format align with common style
        mdadm: make ptest output format align with common style

  Chee Yang Lee (1):
        wic: add support for kernel with initramfs bundled

  Chen Qi (13):
        target-sdk-provides-dummy: add libperl.so.5 64bit
        devtool: warn user about multiple layer having the same base name
        image.bbclass: fix systemd_preset_all
        devtool.py: track to clean devtool.conf in test_create_workspace
        grub-efi.bbclass: take into consideration of multilib
        sysstat: use service file from source codes
        xmlcatalog: hold libxml2-native dependency
        oeqa/runtime/rpm: ensure no user process running before deleting user
        oeqa/runtime/rpm: Move test_rpm_query_nonroot test case to RpmBasicTest
        qemurunner.py: fix race condition at qemu startup
        msmtp: use alternatives to manage /usr/lib/sendmail
        runtime_test.py: use track_for_cleanup for temp dir
        devtool: remove temp dir in upgrade

  Fabio Berton (1):
        mesa: Update 19.1.0 -> 19.1.1

  Haiqing Bai (1):
        sysstat: Use sysstat.service in source for cron with systemd

  He Zhe (1):
        ltp: file01: Fix in was not recognized

  Hongzhi.Song (3):
        ltp: fix shmctl01 failure when executed.
        ltp: diotest4: Let kernel pick an address when calling mmap
        ltp: getrlimit03: adjust-a-bit-of-code-to-compatiable-with mips32

  Jason Wessel (5):
        glibc: Fix multilibs + usrmerge builds
        psmisc: Fix dependency for USE_NLS=no
        glibc-locale: Fix build error with PACKAGE_NO_GCONV = "1"
        glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibs
        glibc / glibc-locale: Fix stash_locale determinism problems

  Joe Slater (1):
        libtool: remove host information from libtool

  Jon Mason (1):
        oe_syslog.py: Handle syslogd/klogd restart race

  Joshua Watt (5):
        python3: Fix .pyc file reproduciblility
        oeqa: Test bitbake --skip-setsecene
        bitbake: bitbake: Add --skip-setscene option
        classes/icecc: Disable remote pre-processing by default
        scripts/buildstats-diff: Add option to filter tasks

  Joël Esponde (1):
        package.bbclass: fix directories setuid and setgid bits

  Jun Nie (1):
        kernel-fitimage: uboot-sign: fix missing signature

  Kai Kang (4):
        rng-tools: fix rngd blocks system shutdown
        openssl: fix multilib files conflict
        webkitgtk: set incomptible with tune mips
        defaultsetup.conf: enable select init manager

  Khem Raj (10):
        efibootmgr: Pass correct flags to compiler from pkg-config
        mpeg2dec: Fix PIE build and avoid relocation in text section on ARM
        Revert "unzip: fix CVE-2019-13232"
        musl: Upgrade to 1.1.23+
        mdadm: Include sys/sysmacros.h for major/minor definitions
        sysvinit: Include sys/sysmacros.h for major/minor definitions on musl too
        pam_systemd: Include missing.h for secure_getenv
        musl-obstack: Add recipe
        elfutils: Fix eu-* utils builds for musl
        maintainers: Account for musl-obstack and libssp-nonshared

  Li Zhou (2):
        bc: dc: fix exit code of q command
        iptables: Security Advisory - iptables - CVE-2019-11360

  Luca Boccassi (1):
        bitbake: tests/fetch.py: add missing skipIfNoNetwork tags to tests that try to git clone

  Matthias Schiffer (1):
        systemd: backport patch to fix sysctl warning on boot

  Mike Crowe (4):
        bitbake.conf: Stop exporting TARGET_ flags variables
        image.bbclass: Only append to IMAGE_LINK_NAME if it was already set
        rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_manifest
        rootfs-postcommands: Cope with empty IMAGE_LINK_NAME in write_image_test_data

  Mikko Rapeli (3):
        busybox: enable unicode support
        cve-check.bbclass: initialize to_append
        freetype: add --tag CC to libtool arguments

  Mingli Yu (2):
        go.bbclass: separate the ptest logic to go-ptest class
        mdadm: fix ptest hang

  Oleksandr Kravchuk (34):
        mc: update to 4.8.23
        encodings: update to 1.0.5
        gawk: update to 5.0.1
        libinput: update to 1.13.3
        libxi: update to 1.7.10
        libxt: update to 1.2.0
        autoconf-archive: update to 2019.01.06
        python3-mako: update to 1.0.12
        python3-pbr: update to 5.3.1
        python3-pygobject: update to 3.32.2
        git: update to 2.22.0
        eudev: update to 3.2.8
        babeltrace: update to 1.5.7
        dpkg: update to 1.19.7
        apt: update to 1.2.31
        libinput: update to 1.13.4
        expat: update to 2.2.7
        libsolf: update to 0.7.5
        bison: update to 3.4.1
        ruby: update to 2.5.5
        quilt: update to 0.66
        bzip2: update to 1.0.7
        python3-mako: update to 1.0.13
        ifupdown: update to 0.8.22
        libdrm: update to 2.4.99
        python3-pbr: update to 5.4.0
        linux-firmware: bump to 20190618
        iproute2: update to 5.2.0
        udev-extraconf: do not mount swap partitions
        python3-pbr: update to 5.4.1
        xinput: update to 1.6.3
        python3-scons: update to 3.1.0
        python3-docutils: update to 0.15
        python3-mako: update to 1.0.14

  Pascal Bach (1):
        cmake: 3.14.1 -> 3.14.5

  Paul Eggleton (7):
        libcap-ng: do not use symlink to share files with libcap-ng-python
        scripts/contrib/ddimage: fix typo
        scripts/contrib/ddimage: replace blacklist with mount check
        scripts/contrib/ddimage: be explicit whether device doesn't exist or isn't writeable
        list-packageconfig-flags: print PN instead of P
        recipetool: ignore zero-length setup.py files
        devtool: upgrade: fix handling of errors parsing upgraded recipe

  Peter Kjellerstedt (4):
        glib-2.0: Update to 2.60.4
        glibc-package.inc: Do not use bitbake variable syntax for shell variables
        meson.bbclass: Remove the MESON_*_ARGS variables
        nativesdk-meson: Remove some unused variables

  Pierre Le Magourou (10):
        cve-update-db: Use std library instead of urllib3
        cve-update-db: Manage proxy if needed.
        cve-update-db: do_populate_cve_db depends on do_fetch
        cve-update-db: Catch request.urlopen errors.
        cve-check: Depends on cve-update-db-native
        cve-update-db: Use NVD CPE data to populate PRODUCTS table
        cve-check: Update unpatched CVE matching
        cve-update-db-native: Skip recipe when cve-check class is not loaded.
        cve-check: Replace CVE_CHECK_CVE_WHITELIST by CVE_CHECK_WHITELIST
        cve-update-db-native: Remove hash column from database.

  Ricardo Ribalda Delgado (4):
        nfs-mountd: Add missing dependency on systemd service
        systemd: Fix interface bring-up on kernels >= 5.2
        wic: Fix (again) partition files UIDs on multi rootfs images
        systemd-bootconf: Mark as machine specific

  Ricardo Salveti (1):
        gcc-9.1: add back GLIBC_DYNAMIC_LINKER riscv changes

  Richard Purdie (58):
        multilib_global: Fix multilib rebuild issue
        multilib_global: Fix KERNEL_VERSION expansion problems
        sysklogd: Fix init script races
        busybox: Improve syslog restart handling
        oeqa/runtime/syslog: Improve test debug messages
        oeqa/runtime/oesyslog: systemd syslog restart doesn't change pid
        oeqa/runtime/syslog: Add delay to test to avoid failures
        busybox: Fix typo in syslog initscript
        pigz: Add debug for autobuilder errors
        staging: Code cleanup
        package: Build pkgdata specific to the current recipe
        Revert "pigz: Add debug for autobuilder errors"
        grub2: Drop unneeded code
        bitbake: event: Clear ui_queue after handling it
        bitbake: main: Ensure log messages are printed when no UI starts
        bitbake: main: Alter EOFError handling
        core-image-sato-sdk-ptest: Reduce image padding size due to bootimg 4GB limit
        oeqa/bbtests: Tweak test bitbake output pattern matching
        sstate: Add tweak to avoid multiple sstate stats messages
        bitbake: siggen: Fix default handler
        bitbake: siggen: Use unique hashes for tasks
        bitbake: runqueue: Tweak buildable variable handling in scheduler
        bitbake: runqueue: Drop unused BB_SETSCENE_VERIFY_FUNCTION2
        bitbake: runqueue: Remove now uneeded code
        bitbake: runqueue: Move scenequeue data generation to a separate function
        bitbake: runqueue: Remove unused function parameter
        bitbake: runqueue: Factor out the process_setscene_whitelist checks
        bitbake: runqueue: Uniquely namespace the scenequeue functions
        bitbake: runqueue: Merge stats handling together for setscene/real tasks
        bitbake: runqueue: Merge scenequeue and real task queue code together
        bitbake: runqueue: Fix counter/task updating glitch
        bitbake: runqueue: Remove RunQueueExecuteScenequeue and RunQueueExecuteTasks
        bitbake: runqueue: Simplify _execute_runqueue logic
        bitbake: runqueue: Fold remains of the scenequeue setup into RunQueueExecute
        bitbake: event/runqueue: Drop StampUpdate event, its pointless/unused
        bitbake: runqueue: Add covered_tasks (or 'collated_deps') to scenequeue data
        bitbake: runqueue: Simplify scenequeue unskippable calculation
        bitbake: runqueue: Tweak comments and debug code
        bitbake: runqueue: Code simplification
        bitbake: runqueue: Remove pointless variable
        bitbake: runqueue: Further scheduler buildable tasks cleanup
        bitbake: runqueue: Clarify scenequeue_covered vs. tasks_covered
        bitbake: runqueue: Merge the queues and execute setscene and normal tasks in parallel
        bitbake: runqueue: Alter setscenewhitelist handling
        bitbake: runqueue: Complete the merge of scenequeue and normal task execution
        bitbake: tests: Add initial scenario based test for runqueue
        bitbake: uihelper: No longer listen to scenequeue task started
        bitbake: runqueue: Simplify some convoluted logic
        bitbake: runqueue: Whitespace fix
        bitbake: runqueue: Abstract hash verification function
        bitbake: runqueue: Optimise multiconfig with overlapping setscene
        bitbake: tests/runqueue: Allow common sstate tasks to become valid
        bitbake: runqueue: Fix non setscene tasks targets being lost
        staging: Drop clean_recipe_sysroot
        poky-lsb: Drop features already in poky
        poky-lsb: Drop libx11 PREFERRED_PROVIDER
        distro/include: Add poky-distro-alt-test-config.inc
        bitbake: siggen: Fix handling of tainted sig files

  Robert Yang (13):
        update-alternatives.bbclass: run update-alternatives firstly in postinst script
        busybox: make postinst run firstly before update-alternatives
        multilib.bbclass: Reduce ALTERNATIVE_PRIORITY for extended recipes
        bitbake: bitbake: lib: Cleanup /usr/bin/env python
        bitbake: bitbake: toaster:tests: python -> python3
        ksum.py: python -> python3
        wic: python2 -> python3
        ext-sdk-prepare.py: python2 -> python3
        oeqa: Cleanup /usr/bin/env python
        package_rpm.bbclass: python2 -> python3
        bitbake: cache: Remove duplicated lines for provides and rprovides
        bitbake: cache: Set packages for skipped recipes
        bitbake: cache: Create a symlink for current cachefile

  Ross Burton (56):
        cve-check: be idiomatic
        gtk-icon-cache: rename intercept to update_gtk_icon_cache
        fortran-helloworld: add a very dumb Fortran Hello World for testing
        oeqa/buildoptions: check that Fortran code actually cross-compiles
        buildhistory: write the contents of the sysroot
        buildhistory: report sysroot changes
        perl: fix Upstream-Status tags
        efivar: ensure that target security flags are not used to build native code
        multilib_script: fix whitespace
        buildhistory_analysis: ignore ownership for sysroot diffs
        insane: use clean_path for the host contamination warnings
        libsndfile1: disable use of sqlite3 by default
        libsndfile1: remove redundant autoconf seeding
        buildhistory: don't output ownership for the sysroot
        buildhistory: filter out the unexpected prefix for native/cross sysroots
        alsa-utils: disable tools using GTK+2
        packagegroup-core-lsb: remove GTK+
        recipetool: add MD5 hash for the line-wrapped MPL-1.1 license
        oeqa/recipetool: change the CMake test to use taglib
        gtk+: remove GTK+ 2
        gnome-themes-standard: remove
        Revert "sysstat: use service file from source codes"
        libpsl: update Upstream-Status
        grub: build with python 3
        qemu: use Python 3 to build
        ninja: use Python 3
        conf/poky: add debian-10 to the supported distribution list
        tiff: remove redundant patch
        tiff: fix CVE-2019-6128
        tiff: fix CVE-2019-7663
        cve-check: remove redundant readline CVE whitelisting
        cve-check-tool: remove
        glibc: exclude child recipes from CVE scanning
        libid3tag: CVE-2017-11551 is the same as CVE-2004-2779
        libid3tag: handle unknown encodings (CVE-2017-11550)
        subversion: set CVE vendor to Apache
        boost: set CVE vendor to Boost
        git: set CVE vendor to git-scm
        ed: set CVE vendor to avoid false positives
        cve-check: allow comparison of Vendor as well as Product
        flex: set CVE_PRODUCT to include vendor
        cve-update-db-native: use SQL placeholders instead of format strings
        xkeyboard-config: remove redundant intltool dependency
        piglit: upgrade to latest revision
        pkgconf: upgrade 1.6.1 -> 1.6.3
        conf/poky: add Fedora 30 and Opensuse Leap 15.1 to supported distributions
        cve-update-db-native: use os.path.join instead of +
        cve-update-db: actually inherit native
        cve-update-db-native: use executemany() to optimise CPE insertion
        cve-update-db-native: improve metadata parsing
        cve-update-db-native: clean up JSON fetching
        freetype: upgrade to 2.10.1
        unfs3: set upstream tag regex to avoid false-positives
        meson.bbclass: export STRIP=${BUILD_STRIP}
        ffmpeg: don't use hardcoded lookup tables
        ffmpeg: upgrade to 4.1.4

  Sai Hari Chandana Kalluri (3):
        devtool/standard.py: Update devtool modify to copy source from work-shared if its already downloaded
        devtool/standard.py: Create a copy of kernel source within work-shared if not present
        devtool: provide support for devtool menuconfig command

  Scott Rifenbark (5):
        overview-manual: Fixed manual history table
        sdk-manual: Updated devtool to talk about oe-local-files.
        dev-manual: Provided proper link title
        ref-manual: Fixed typo for BBMULTICONFIG variable.
        ref-manual: Removed "python2" mention in example.

  Stefan Agner (1):
        psplash: create psplash tmpfs mount directory in psplash-init

  Tim Orling (3):
        vulkan-headers: add recipe
        vulkan-loader: add recipe
        vulkan-tools: add recipe

  Ulrich Ölmann (1):
        squashfs-tools: upgrade to commit f95864afe883

  William Bourque (2):
        wic/plugins: Source that support both EFI and BIOS
        meta/lib/oeqa: Test for bootimg-biosplusefi Source

  Yi Zhao (2):
        debianutils: upgrade 4.8.6.1 -> 4.8.6.3
        ltp: upgrade 20190115 -> 20190517

  Zang Ruochen (9):
        nss: upgrade 3.44 -> 3.44.1
        util-linux:upgrade 2.33.2 -> 2.34
        librepo:upgrade 1.10.3 -> 1.10.4
        sqlite3: Upgrade 3.28.0 -> 3.29.0
        nss: Upgrade 3.44.1 -> 3.45
        xauth:upgrade 1.0.10 -> 1.1
        libice:upgrade 1.0.9 -> 1.0.10
        xwininfo:upgrade 1.1.4 -> 1.1.5
        libpciaccess:upgrade 0.14 -> 0.16

meta-phosphor: fe8cee7488..601f253a66:
  Brad Bishop (1):
        meta-phosphor: systemd: remove upstreamed patches

Change-Id: If591144821cd2e5b990a7aa49a1cf426f6a906de
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/poky/README.LSB b/poky/README.LSB
index f68d07c..fecbe54 100644
--- a/poky/README.LSB
+++ b/poky/README.LSB
@@ -12,6 +12,9 @@
   tests any longer. Users are recommended to group together to support
   maintenance of that layer. [http://git.yoctoproject.org/cgit/cgit.cgi/meta-qt4/]
 
+* GTK+ 2 is provided by meta-oe.  It is noted that GTK+ 2 is end of life
+  and use of GTK+ 2 isn't recommended.
+
 * mailx has been dropped since its no longer being developed upstream 
   and there are better, more modern replacements such as s-nail 
   (http://sdaoden.eu/code.html) or mailutils (http://mailutils.org/).
diff --git a/poky/bitbake/bin/bitbake-selftest b/poky/bitbake/bin/bitbake-selftest
index 20553e9..041a271 100755
--- a/poky/bitbake/bin/bitbake-selftest
+++ b/poky/bitbake/bin/bitbake-selftest
@@ -25,6 +25,7 @@
          "bb.tests.fetch",
          "bb.tests.parse",
          "bb.tests.persist_data",
+         "bb.tests.runqueue",
          "bb.tests.utils",
          "hashserv.tests",
          "layerindexlib.tests.layerindexobj",
diff --git a/poky/bitbake/lib/bb/cache.py b/poky/bitbake/lib/bb/cache.py
index 5fb2f17..ab18dd5 100644
--- a/poky/bitbake/lib/bb/cache.py
+++ b/poky/bitbake/lib/bb/cache.py
@@ -83,20 +83,20 @@
         self.appends = self.listvar('__BBAPPEND', metadata)
         self.nocache = self.getvar('BB_DONT_CACHE', metadata)
 
-        self.skipreason = self.getvar('__SKIPPED', metadata)
-        if self.skipreason:
-            self.pn = self.getvar('PN', metadata) or bb.parse.vars_from_file(filename,metadata)[0]
-            self.skipped = True
-            self.provides  = self.depvar('PROVIDES', metadata)
-            self.rprovides = self.depvar('RPROVIDES', metadata)
-            return
-
-        self.tasks = metadata.getVar('__BBTASKS', False)
-
-        self.pn = self.getvar('PN', metadata)
+        self.provides  = self.depvar('PROVIDES', metadata)
+        self.rprovides = self.depvar('RPROVIDES', metadata)
+        self.pn = self.getvar('PN', metadata) or bb.parse.vars_from_file(filename,metadata)[0]
         self.packages = self.listvar('PACKAGES', metadata)
         if not self.packages:
             self.packages.append(self.pn)
+        self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata)
+
+        self.skipreason = self.getvar('__SKIPPED', metadata)
+        if self.skipreason:
+            self.skipped = True
+            return
+
+        self.tasks = metadata.getVar('__BBTASKS', False)
 
         self.basetaskhashes = self.taskvar('BB_BASEHASH', self.tasks, metadata)
         self.hashfilename = self.getvar('BB_HASHFILENAME', metadata)
@@ -113,11 +113,8 @@
         self.stampclean = self.getvar('STAMPCLEAN', metadata)
         self.stamp_extrainfo = self.flaglist('stamp-extra-info', self.tasks, metadata)
         self.file_checksums = self.flaglist('file-checksums', self.tasks, metadata, True)
-        self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata)
         self.depends          = self.depvar('DEPENDS', metadata)
-        self.provides         = self.depvar('PROVIDES', metadata)
         self.rdepends         = self.depvar('RDEPENDS', metadata)
-        self.rprovides        = self.depvar('RPROVIDES', metadata)
         self.rrecommends      = self.depvar('RRECOMMENDS', metadata)
         self.rprovides_pkg    = self.pkgvar('RPROVIDES', self.packages, metadata)
         self.rdepends_pkg     = self.pkgvar('RDEPENDS', self.packages, metadata)
@@ -399,6 +396,15 @@
         else:
             logger.debug(1, "Cache file %s not found, building..." % self.cachefile)
 
+        # We don't use the symlink, its just for debugging convinience
+        symlink = os.path.join(self.cachedir, "bb_cache.dat")
+        if os.path.exists(symlink):
+            bb.utils.remove(symlink)
+        try:
+            os.symlink(os.path.basename(self.cachefile), symlink)
+        except OSError:
+            pass
+
     def load_cachefile(self):
         cachesize = 0
         previous_progress = 0
diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py
index 0008c2f..b4851e1 100644
--- a/poky/bitbake/lib/bb/cooker.py
+++ b/poky/bitbake/lib/bb/cooker.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright (C) 2003, 2004  Chris Larson
 # Copyright (C) 2003, 2004  Phil Blundell
diff --git a/poky/bitbake/lib/bb/cookerdata.py b/poky/bitbake/lib/bb/cookerdata.py
index 842275d..144e803 100644
--- a/poky/bitbake/lib/bb/cookerdata.py
+++ b/poky/bitbake/lib/bb/cookerdata.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright (C) 2003, 2004  Chris Larson
 # Copyright (C) 2003, 2004  Phil Blundell
@@ -122,6 +121,7 @@
         self.profile = False
         self.nosetscene = False
         self.setsceneonly = False
+        self.skipsetscene = False
         self.invalidate_stamp = False
         self.dump_signatures = []
         self.dry_run = False
diff --git a/poky/bitbake/lib/bb/event.py b/poky/bitbake/lib/bb/event.py
index 7cbb5ca..d44621e 100644
--- a/poky/bitbake/lib/bb/event.py
+++ b/poky/bitbake/lib/bb/event.py
@@ -124,6 +124,7 @@
 ui_queue = []
 @atexit.register
 def print_ui_queue():
+    global ui_queue
     """If we're exiting before a UI has been spawned, display any queued
     LogRecords to the console."""
     logger = logging.getLogger("BitBake")
@@ -168,6 +169,7 @@
             logger.removeHandler(stderr)
         else:
             logger.removeHandler(stdout)
+        ui_queue = []
 
 def fire_ui_handlers(event, d):
     global _thread_lock
@@ -402,23 +404,6 @@
 class RecipeParsed(RecipeEvent):
     """ Recipe Parsing Complete """
 
-class StampUpdate(Event):
-    """Trigger for any adjustment of the stamp files to happen"""
-
-    def __init__(self, targets, stampfns):
-        self._targets = targets
-        self._stampfns = stampfns
-        Event.__init__(self)
-
-    def getStampPrefix(self):
-        return self._stampfns
-
-    def getTargets(self):
-        return self._targets
-
-    stampPrefix = property(getStampPrefix)
-    targets = property(getTargets)
-
 class BuildBase(Event):
     """Base class for bitbake build events"""
 
diff --git a/poky/bitbake/lib/bb/fetch2/clearcase.py b/poky/bitbake/lib/bb/fetch2/clearcase.py
index 9ed0d9b..3dd93ad 100644
--- a/poky/bitbake/lib/bb/fetch2/clearcase.py
+++ b/poky/bitbake/lib/bb/fetch2/clearcase.py
@@ -54,6 +54,8 @@
 import bb
 from   bb.fetch2 import FetchMethod
 from   bb.fetch2 import FetchError
+from   bb.fetch2 import MissingParameterError
+from   bb.fetch2 import ParameterError
 from   bb.fetch2 import runfetchcmd
 from   bb.fetch2 import logger
 
@@ -79,7 +81,7 @@
         if 'protocol' in ud.parm:
             ud.proto = ud.parm['protocol']
         if not ud.proto in ('http', 'https'):
-            raise fetch2.ParameterError("Invalid protocol type", ud.url)
+            raise ParameterError("Invalid protocol type", ud.url)
 
         ud.vob = ''
         if 'vob' in ud.parm:
diff --git a/poky/bitbake/lib/bb/main.py b/poky/bitbake/lib/bb/main.py
index ca59eb9..af2880f 100755
--- a/poky/bitbake/lib/bb/main.py
+++ b/poky/bitbake/lib/bb/main.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright (C) 2003, 2004  Chris Larson
 # Copyright (C) 2003, 2004  Phil Blundell
@@ -255,6 +254,11 @@
                           help="Do not run any setscene tasks. sstate will be ignored and "
                                "everything needed, built.")
 
+        parser.add_option("", "--skip-setscene", action="store_true",
+                          dest="skipsetscene", default=False,
+                          help="Skip setscene tasks if they would be executed. Tasks previously "
+                               "restored from sstate will be kept, unlike --no-setscene")
+
         parser.add_option("", "--setscene-only", action="store_true",
                           dest="setsceneonly", default=False,
                           help="Only run setscene tasks, don't run any real tasks.")
@@ -448,12 +452,7 @@
                             bb.utils.unlockfile(lock)
                         raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?")
                 if not configParams.server_only:
-                    try:
-                        server_connection = bb.server.process.connectProcessServer(sockname, featureset)
-                    except EOFError:
-                        # The server may have been shutting down but not closed the socket yet. If that happened,
-                        # ignore it.
-                        pass
+                    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
 
                 if server_connection or configParams.server_only:
                     break
@@ -464,12 +463,13 @@
                     raise
                 retries -= 1
                 tryno = 8 - retries
-                if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError)):
+                if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError)):
                     logger.info("Retrying server connection (#%d)..." % tryno)
                 else:
                     logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))
             if not retries:
-                bb.fatal("Unable to connect to bitbake server, or start one")
+                bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).")
+            bb.event.print_ui_queue()
             if retries < 5:
                 time.sleep(5)
 
diff --git a/poky/bitbake/lib/bb/monitordisk.py b/poky/bitbake/lib/bb/monitordisk.py
index 69b25c7..1a25b00 100644
--- a/poky/bitbake/lib/bb/monitordisk.py
+++ b/poky/bitbake/lib/bb/monitordisk.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright (C) 2012 Robert Yang
 #
diff --git a/poky/bitbake/lib/bb/namedtuple_with_abc.py b/poky/bitbake/lib/bb/namedtuple_with_abc.py
index c8e1d55..646aed6 100644
--- a/poky/bitbake/lib/bb/namedtuple_with_abc.py
+++ b/poky/bitbake/lib/bb/namedtuple_with_abc.py
@@ -1,5 +1,4 @@
 # http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/
-#!/usr/bin/env python
 # Copyright (c) 2011 Jan Kaliszewski (zuo). Available under the MIT License.
 #
 # SPDX-License-Identifier: MIT
diff --git a/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py b/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 889f230..6f7cf82 100644
--- a/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 """
    class for handling .bb files
 
diff --git a/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index 71bf61b..2e84b91 100644
--- a/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 """
    class for handling configuration data files
 
diff --git a/poky/bitbake/lib/bb/parse/parse_py/__init__.py b/poky/bitbake/lib/bb/parse/parse_py/__init__.py
index cdebe44..f508afa 100644
--- a/poky/bitbake/lib/bb/parse/parse_py/__init__.py
+++ b/poky/bitbake/lib/bb/parse/parse_py/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 """
 BitBake Parsers
 
diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py
index 010b085..6a2de24 100644
--- a/poky/bitbake/lib/bb/runqueue.py
+++ b/poky/bitbake/lib/bb/runqueue.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 """
 BitBake 'RunQueue' implementation
 
@@ -26,6 +25,7 @@
 import pickle
 from multiprocessing import Process
 import shlex
+import pprint
 
 bblogger = logging.getLogger("BitBake")
 logger = logging.getLogger("BitBake.RunQueue")
@@ -68,6 +68,14 @@
         return "mc:" + mc + ":" + fn + ":" + taskname
     return fn + ":" + taskname
 
+# Index used to pair up potentially matching multiconfig tasks
+# We match on PN, taskname and hash being equal
+def pending_hash_index(tid, rqdata):
+    (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+    pn = rqdata.dataCaches[mc].pkg_fn[taskfn]
+    h = rqdata.runtaskentries[tid].hash
+    return pn + ":" + "taskname" + h
+
 class RunQueueStats:
     """
     Holds statistics on the tasks handled by the associated runQueue
@@ -103,8 +111,6 @@
 # runQueue state machine
 runQueuePrepare = 2
 runQueueSceneInit = 3
-runQueueSceneRun = 4
-runQueueRunInit = 5
 runQueueRunning = 6
 runQueueFailed = 7
 runQueueCleanUp = 8
@@ -143,7 +149,8 @@
         Return the id of the first task we find that is buildable
         """
         self.buildable = [x for x in self.buildable if x not in self.rq.runq_running]
-        if not self.buildable:
+        buildable = [x for x in self.buildable if (x in self.rq.tasks_covered or x in self.rq.tasks_notcovered)]
+        if not buildable:
             return None
 
         # Filter out tasks that have a max number of threads that have been exceeded
@@ -159,8 +166,8 @@
             else:
                 skip_buildable[rtaskname] = 1
 
-        if len(self.buildable) == 1:
-            tid = self.buildable[0]
+        if len(buildable) == 1:
+            tid = buildable[0]
             taskname = taskname_from_tid(tid)
             if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]):
                 return None
@@ -175,7 +182,7 @@
 
         best = None
         bestprio = None
-        for tid in self.buildable:
+        for tid in buildable:
             taskname = taskname_from_tid(tid)
             if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]):
                 continue
@@ -1194,7 +1201,6 @@
 
         self.stamppolicy = cfgData.getVar("BB_STAMP_POLICY") or "perfile"
         self.hashvalidate = cfgData.getVar("BB_HASHCHECK_FUNCTION") or None
-        self.setsceneverify = cfgData.getVar("BB_SETSCENE_VERIFY_FUNCTION2") or None
         self.depvalidate = cfgData.getVar("BB_SETSCENE_DEPVALID") or None
 
         self.state = runQueuePrepare
@@ -1203,7 +1209,7 @@
         # Invoked at regular time intervals via the bitbake heartbeat event
         # while the build is running. We generate a unique name for the handler
         # here, just in case that there ever is more than one RunQueue instance,
-        # start the handler when reaching runQueueSceneRun, and stop it when
+        # start the handler when reaching runQueueSceneInit, and stop it when
         # done with the build.
         self.dm = monitordisk.diskMonitor(cfgData)
         self.dm_event_handler_name = '_bb_diskmonitor_' + str(id(self))
@@ -1378,10 +1384,43 @@
             cache[tid] = iscurrent
         return iscurrent
 
-    def validate_hash(self, *, sq_fn, sq_task, sq_hash, sq_hashfn, siginfo, sq_unihash, d):
+    def validate_hashes(self, tocheck, data, presentcount=None, siginfo=False):
+        valid = set()
+        if self.hashvalidate:
+            sq_hash = []
+            sq_hashfn = []
+            sq_unihash = []
+            sq_fn = []
+            sq_taskname = []
+            sq_task = []
+            for tid in tocheck:
+                (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+
+                sq_fn.append(fn)
+                sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
+                sq_hash.append(self.rqdata.runtaskentries[tid].hash)
+                sq_unihash.append(self.rqdata.runtaskentries[tid].unihash)
+                sq_taskname.append(taskname)
+                sq_task.append(tid)
+
+            if presentcount is not None:
+                data.setVar("BB_SETSCENE_STAMPCURRENT_COUNT", presentcount)
+
+            valid_ids = self.validate_hash(sq_fn, sq_taskname, sq_hash, sq_hashfn, siginfo, sq_unihash, data, presentcount)
+
+            if presentcount is not None:
+                data.delVar("BB_SETSCENE_STAMPCURRENT_COUNT")
+
+            for v in valid_ids:
+                valid.add(sq_task[v])
+
+        return valid
+
+    def validate_hash(self, sq_fn, sq_task, sq_hash, sq_hashfn, siginfo, sq_unihash, d, presentcount):
         locs = {"sq_fn" : sq_fn, "sq_task" : sq_task, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn,
                 "sq_unihash" : sq_unihash, "siginfo" : siginfo, "d" : d}
 
+        # Backwards compatibility
         hashvalidate_args = ("(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=siginfo, sq_unihash=sq_unihash)",
                              "(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=siginfo)",
                              "(sq_fn, sq_task, sq_hash, sq_hashfn, d)")
@@ -1408,7 +1447,6 @@
         retval = True
 
         if self.state is runQueuePrepare:
-            self.rqexe = RunQueueExecuteDummy(self)
             # NOTE: if you add, remove or significantly refactor the stages of this
             # process then you should recalculate the weightings here. This is quite
             # easy to do - just change the next line temporarily to pass debug=True as
@@ -1422,18 +1460,19 @@
                 self.state = runQueueComplete
             else:
                 self.state = runQueueSceneInit
-                self.rqdata.init_progress_reporter.next_stage()
-
-                # we are ready to run,  emit dependency info to any UI or class which
-                # needs it
-                depgraph = self.cooker.buildDependTree(self, self.rqdata.taskData)
-                self.rqdata.init_progress_reporter.next_stage()
-                bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.cooker.data)
 
         if self.state is runQueueSceneInit:
+            self.rqdata.init_progress_reporter.next_stage()
+
+            # we are ready to run,  emit dependency info to any UI or class which
+            # needs it
+            depgraph = self.cooker.buildDependTree(self, self.rqdata.taskData)
+            self.rqdata.init_progress_reporter.next_stage()
+            bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.cooker.data)
+
             if not self.dm_event_handler_registered:
                  res = bb.event.register(self.dm_event_handler_name,
-                                         lambda x: self.dm.check(self) if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp] else False,
+                                         lambda x: self.dm.check(self) if self.state in [runQueueRunning, runQueueCleanUp] else False,
                                          ('bb.event.HeartbeatEvent',))
                  self.dm_event_handler_registered = True
 
@@ -1446,24 +1485,23 @@
                 if 'printdiff' in dump:
                     self.write_diffscenetasks(invalidtasks)
                 self.state = runQueueComplete
-            else:
-                self.rqdata.init_progress_reporter.next_stage()
-                self.start_worker()
-                self.rqdata.init_progress_reporter.next_stage()
-                self.rqexe = RunQueueExecuteScenequeue(self)
 
-        if self.state is runQueueSceneRun:
-            retval = self.rqexe.execute()
+        if self.state is runQueueSceneInit:
+            self.rqdata.init_progress_reporter.next_stage()
+            self.start_worker()
+            self.rqdata.init_progress_reporter.next_stage()
+            self.rqexe = RunQueueExecute(self)
 
-        if self.state is runQueueRunInit:
-            if self.cooker.configuration.setsceneonly:
-                self.state = runQueueComplete
-            else:
-                # Just in case we didn't setscene
-                self.rqdata.init_progress_reporter.finish()
-                logger.info("Executing RunQueue Tasks")
-                self.rqexe = RunQueueExecuteTasks(self)
-                self.state = runQueueRunning
+            # If we don't have any setscene functions, skip execution
+            if len(self.rqdata.runq_setscene_tids) == 0:
+                logger.info('No setscene tasks')
+                for tid in self.rqdata.runtaskentries:
+                    if len(self.rqdata.runtaskentries[tid].depends) == 0:
+                        self.rqexe.setbuildable(tid)
+                    self.rqexe.tasks_notcovered.add(tid)
+                self.rqexe.sqdone = True
+            logger.info('Executing Tasks')
+            self.state = runQueueRunning
 
         if self.state is runQueueRunning:
             retval = self.rqexe.execute()
@@ -1479,11 +1517,12 @@
 
         if build_done and self.rqexe:
             self.teardown_workers()
-            if self.rqexe.stats.failed:
-                logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed.", self.rqexe.stats.completed + self.rqexe.stats.failed, self.rqexe.stats.skipped, self.rqexe.stats.failed)
-            else:
-                # Let's avoid the word "failed" if nothing actually did
-                logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and all succeeded.", self.rqexe.stats.completed, self.rqexe.stats.skipped)
+            if self.rqexe:
+                if self.rqexe.stats.failed:
+                    logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed.", self.rqexe.stats.completed + self.rqexe.stats.failed, self.rqexe.stats.skipped, self.rqexe.stats.failed)
+                else:
+                    # Let's avoid the word "failed" if nothing actually did
+                    logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and all succeeded.", self.rqexe.stats.completed, self.rqexe.stats.skipped)
 
         if self.state is runQueueFailed:
             raise bb.runqueue.TaskFailure(self.rqexe.failed_tids)
@@ -1566,16 +1605,8 @@
 
     def print_diffscenetasks(self):
 
-        valid = []
-        sq_hash = []
-        sq_hashfn = []
-        sq_unihash = []
-        sq_fn = []
-        sq_taskname = []
-        sq_task = []
         noexec = []
-        stamppresent = []
-        valid_new = set()
+        tocheck = set()
 
         for tid in self.rqdata.runtaskentries:
             (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
@@ -1585,18 +1616,9 @@
                 noexec.append(tid)
                 continue
 
-            sq_fn.append(fn)
-            sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
-            sq_hash.append(self.rqdata.runtaskentries[tid].hash)
-            sq_unihash.append(self.rqdata.runtaskentries[tid].unihash)
-            sq_taskname.append(taskname)
-            sq_task.append(tid)
+            tocheck.add(tid)
 
-        valid = self.validate_hash(sq_fn=sq_fn, sq_task=sq_taskname, sq_hash=sq_hash, sq_hashfn=sq_hashfn,
-                siginfo=True, sq_unihash=sq_unihash, d=self.cooker.data)
-
-        for v in valid:
-            valid_new.add(sq_task[v])
+        valid_new = self.validate_hashes(tocheck, self.cooker.data, None, True)
 
         # Tasks which are both setscene and noexec never care about dependencies
         # We therefore find tasks which are setscene and noexec and mark their
@@ -1680,6 +1702,7 @@
                 output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb)
                 bb.plain("\nTask %s:%s couldn't be used from the cache because:\n  We need hash %s, closest matching task was %s\n  " % (pn, taskname, h, prevh) + '\n  '.join(output))
 
+
 class RunQueueExecute:
 
     def __init__(self, rq):
@@ -1691,6 +1714,10 @@
         self.number_tasks = int(self.cfgData.getVar("BB_NUMBER_THREADS") or 1)
         self.scheduler = self.cfgData.getVar("BB_SCHEDULER") or "speed"
 
+        self.sq_buildable = set()
+        self.sq_running = set()
+        self.sq_live = set()
+
         self.runq_buildable = set()
         self.runq_running = set()
         self.runq_complete = set()
@@ -1698,9 +1725,15 @@
         self.build_stamps = {}
         self.build_stamps2 = []
         self.failed_tids = []
+        self.sq_deferred = {}
 
         self.stampcache = {}
 
+        self.sqdone = False
+
+        self.stats = RunQueueStats(len(self.rqdata.runtaskentries))
+        self.sq_stats = RunQueueStats(len(self.rqdata.runq_setscene_tids))
+
         for mc in rq.worker:
             rq.worker[mc].pipe.setrunqueueexec(self)
         for mc in rq.fakeworker:
@@ -1709,6 +1742,31 @@
         if self.number_tasks <= 0:
              bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks)
 
+        # List of setscene tasks which we've covered
+        self.scenequeue_covered = set()
+        # List of tasks which are covered (including setscene ones)
+        self.tasks_covered = set()
+        self.tasks_scenequeue_done = set()
+        self.scenequeue_notcovered = set()
+        self.tasks_notcovered = set()
+        self.scenequeue_notneeded = set()
+
+        self.coveredtopocess = set()
+
+        schedulers = self.get_schedulers()
+        for scheduler in schedulers:
+            if self.scheduler == scheduler.name:
+                self.sched = scheduler(self, self.rqdata)
+                logger.debug(1, "Using runqueue scheduler '%s'", scheduler.name)
+                break
+        else:
+            bb.fatal("Invalid scheduler '%s'.  Available schedulers: %s" %
+                     (self.scheduler, ", ".join(obj.name for obj in schedulers)))
+
+        if len(self.rqdata.runq_setscene_tids) > 0:
+            self.sqdata = SQData()
+            build_scenequeue_data(self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self)
+
     def runqueue_process_waitpid(self, task, status):
 
         # self.build_stamps[pid] may not exist when use shared work directory.
@@ -1716,10 +1774,17 @@
             self.build_stamps2.remove(self.build_stamps[task])
             del self.build_stamps[task]
 
-        if status != 0:
-            self.task_fail(task, status)
+        if task in self.sq_live:
+            if status != 0:
+                self.sq_task_fail(task, status)
+            else:
+                self.sq_task_complete(task)
+            self.sq_live.remove(task)
         else:
-            self.task_complete(task)
+            if status != 0:
+                self.task_fail(task, status)
+            else:
+                self.task_complete(task)
         return True
 
     def finish_now(self):
@@ -1748,8 +1813,9 @@
     def finish(self):
         self.rq.state = runQueueCleanUp
 
-        if self.stats.active > 0:
-            bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData)
+        active = self.stats.active + self.sq_stats.active
+        if active > 0:
+            bb.event.fire(runQueueExitWait(active), self.cfgData)
             self.rq.read_workers()
             return self.rq.active_fds()
 
@@ -1760,7 +1826,8 @@
         self.rq.state = runQueueComplete
         return True
 
-    def check_dependencies(self, task, taskdeps, setscene = False):
+    # Used by setscene only
+    def check_dependencies(self, task, taskdeps):
         if not self.rq.depvalidate:
             return False
 
@@ -1776,121 +1843,10 @@
         return valid
 
     def can_start_task(self):
-        can_start = self.stats.active < self.number_tasks
+        active = self.stats.active + self.sq_stats.active
+        can_start = active < self.number_tasks
         return can_start
 
-class RunQueueExecuteDummy(RunQueueExecute):
-    def __init__(self, rq):
-        self.rq = rq
-        self.stats = RunQueueStats(0)
-
-    def finish(self):
-        self.rq.state = runQueueComplete
-        return
-
-class RunQueueExecuteTasks(RunQueueExecute):
-    def __init__(self, rq):
-        RunQueueExecute.__init__(self, rq)
-
-        self.stats = RunQueueStats(len(self.rqdata.runtaskentries))
-
-        self.stampcache = {}
-
-        initial_covered = self.rq.scenequeue_covered.copy()
-
-        # Mark initial buildable tasks
-        for tid in self.rqdata.runtaskentries:
-            if len(self.rqdata.runtaskentries[tid].depends) == 0:
-                self.runq_buildable.add(tid)
-            if len(self.rqdata.runtaskentries[tid].revdeps) > 0 and self.rqdata.runtaskentries[tid].revdeps.issubset(self.rq.scenequeue_covered):
-                self.rq.scenequeue_covered.add(tid)
-
-        found = True
-        while found:
-            found = False
-            for tid in self.rqdata.runtaskentries:
-                if tid in self.rq.scenequeue_covered:
-                    continue
-                logger.debug(1, 'Considering %s: %s' % (tid, str(self.rqdata.runtaskentries[tid].revdeps)))
-
-                if len(self.rqdata.runtaskentries[tid].revdeps) > 0 and self.rqdata.runtaskentries[tid].revdeps.issubset(self.rq.scenequeue_covered):
-                    if tid in self.rq.scenequeue_notcovered:
-                        continue
-                    found = True
-                    self.rq.scenequeue_covered.add(tid)
-
-        logger.debug(1, 'Skip list (pre setsceneverify) %s', sorted(self.rq.scenequeue_covered))
-
-        # Allow the metadata to elect for setscene tasks to run anyway
-        covered_remove = set()
-        if self.rq.setsceneverify:
-            invalidtasks = []
-            tasknames = {}
-            fns = {}
-            for tid in self.rqdata.runtaskentries:
-                (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-                taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
-                fns[tid] = taskfn
-                tasknames[tid] = taskname
-                if 'noexec' in taskdep and taskname in taskdep['noexec']:
-                    continue
-                if self.rq.check_stamp_task(tid, taskname + "_setscene", cache=self.stampcache):
-                    logger.debug(2, 'Setscene stamp current for task %s', tid)
-                    continue
-                if self.rq.check_stamp_task(tid, taskname, recurse = True, cache=self.stampcache):
-                    logger.debug(2, 'Normal stamp current for task %s', tid)
-                    continue
-                invalidtasks.append(tid)
-
-            call = self.rq.setsceneverify + "(covered, tasknames, fns, d, invalidtasks=invalidtasks)"
-            locs = { "covered" : self.rq.scenequeue_covered, "tasknames" : tasknames, "fns" : fns, "d" : self.cooker.data, "invalidtasks" : invalidtasks }
-            covered_remove = bb.utils.better_eval(call, locs)
-
-        def removecoveredtask(tid):
-            (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-            taskname = taskname + '_setscene'
-            bb.build.del_stamp(taskname, self.rqdata.dataCaches[mc], taskfn)
-            self.rq.scenequeue_covered.remove(tid)
-
-        toremove = covered_remove | self.rq.scenequeue_notcovered
-        for task in toremove:
-            logger.debug(1, 'Not skipping task %s due to setsceneverify', task)
-        while toremove:
-            covered_remove = []
-            for task in toremove:
-                if task in self.rq.scenequeue_covered:
-                    removecoveredtask(task)
-                for deptask in self.rqdata.runtaskentries[task].depends:
-                    if deptask not in self.rq.scenequeue_covered:
-                        continue
-                    if deptask in toremove or deptask in covered_remove or deptask in initial_covered:
-                        continue
-                    logger.debug(1, 'Task %s depends on task %s so not skipping' % (task, deptask))
-                    covered_remove.append(deptask)
-            toremove = covered_remove
-
-        logger.debug(1, 'Full skip list %s', self.rq.scenequeue_covered)
-
-
-        for mc in self.rqdata.dataCaches:
-            target_pairs = []
-            for tid in self.rqdata.target_tids:
-                (tidmc, fn, taskname, _) = split_tid_mcfn(tid)
-                if tidmc == mc:
-                    target_pairs.append((fn, taskname))
-
-            event.fire(bb.event.StampUpdate(target_pairs, self.rqdata.dataCaches[mc].stamp), self.cfgData)
-
-        schedulers = self.get_schedulers()
-        for scheduler in schedulers:
-            if self.scheduler == scheduler.name:
-                self.sched = scheduler(self, self.rqdata)
-                logger.debug(1, "Using runqueue scheduler '%s'", scheduler.name)
-                break
-        else:
-            bb.fatal("Invalid scheduler '%s'.  Available schedulers: %s" %
-                     (self.scheduler, ", ".join(obj.name for obj in schedulers)))
-
     def get_schedulers(self):
         schedulers = set(obj for obj in globals().values()
                              if type(obj) is type and
@@ -1964,65 +1920,137 @@
 
     def execute(self):
         """
-        Run the tasks in a queue prepared by rqdata.prepare()
+        Run the tasks in a queue prepared by prepare_runqueue
         """
 
-        if self.rqdata.setscenewhitelist is not None and not self.rqdata.setscenewhitelist_checked:
-            self.rqdata.setscenewhitelist_checked = True
-
-            # Check tasks that are going to run against the whitelist
-            def check_norun_task(tid, showerror=False):
-                (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-                # Ignore covered tasks
-                if tid in self.rq.scenequeue_covered:
-                    return False
-                # Ignore stamped tasks
-                if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache):
-                    return False
-                # Ignore noexec tasks
-                taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
-                if 'noexec' in taskdep and taskname in taskdep['noexec']:
-                    return False
-
-                pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
-                if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist):
-                    if showerror:
-                        if tid in self.rqdata.runq_setscene_tids:
-                            logger.error('Task %s.%s attempted to execute unexpectedly and should have been setscened' % (pn, taskname))
-                        else:
-                            logger.error('Task %s.%s attempted to execute unexpectedly' % (pn, taskname))
-                    return True
-                return False
-            # Look to see if any tasks that we think shouldn't run are going to
-            unexpected = False
-            for tid in self.rqdata.runtaskentries:
-                if check_norun_task(tid):
-                    unexpected = True
-                    break
-            if unexpected:
-                # Run through the tasks in the rough order they'd have executed and print errors
-                # (since the order can be useful - usually missing sstate for the last few tasks
-                # is the cause of the problem)
-                task = self.sched.next()
-                while task is not None:
-                    check_norun_task(task, showerror=True)
-                    self.task_skip(task, 'Setscene enforcement check')
-                    task = self.sched.next()
-
-                self.rq.state = runQueueCleanUp
-                return True
-
         self.rq.read_workers()
 
-        if self.stats.total == 0:
-            # nothing to do
-            self.rq.state = runQueueCleanUp
+        task = None
+        if not self.sqdone and self.can_start_task():
+            # Find the next setscene to run
+            for nexttask in self.rqdata.runq_setscene_tids:
+                if nexttask in self.sq_buildable and nexttask not in self.sq_running and self.sqdata.stamps[nexttask] not in self.build_stamps.values():
+                    if nexttask not in self.sqdata.unskippable and len(self.sqdata.sq_revdeps[nexttask]) > 0 and self.sqdata.sq_revdeps[nexttask].issubset(self.scenequeue_covered) and self.check_dependencies(nexttask, self.sqdata.sq_revdeps[nexttask]):
+                        if nexttask not in self.rqdata.target_tids:
+                            logger.debug(2, "Skipping setscene for task %s" % nexttask)
+                            self.sq_task_skip(nexttask)
+                            self.scenequeue_notneeded.add(nexttask)
+                            if nexttask in self.sq_deferred:
+                                del self.sq_deferred[nexttask]
+                            return True
+                    if nexttask in self.sq_deferred:
+                        if self.sq_deferred[nexttask] not in self.runq_complete:
+                            continue
+                        logger.debug(1, "Task %s no longer deferred" % nexttask)
+                        del self.sq_deferred[nexttask]
+                        valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, None, False)
+                        if not valid:
+                            logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask)
+                            self.sq_task_failoutright(nexttask)
+                            return True
+                        else:
+                            self.sqdata.outrightfail.remove(nexttask)
+                    if nexttask in self.sqdata.outrightfail:
+                        logger.debug(2, 'No package found, so skipping setscene task %s', nexttask)
+                        self.sq_task_failoutright(nexttask)
+                        return True
+                    if nexttask in self.sqdata.unskippable:
+                        logger.debug(2, "Setscene task %s is unskippable" % nexttask)
+                    task = nexttask
+                    break
+        if task is not None:
+            (mc, fn, taskname, taskfn) = split_tid_mcfn(task)
+            taskname = taskname + "_setscene"
+            if self.rq.check_stamp_task(task, taskname_from_tid(task), recurse = True, cache=self.stampcache):
+                logger.debug(2, 'Stamp for underlying task %s is current, so skipping setscene variant', task)
+                self.sq_task_failoutright(task)
+                return True
 
-        task = self.sched.next()
+            if self.cooker.configuration.force:
+                if task in self.rqdata.target_tids:
+                    self.sq_task_failoutright(task)
+                    return True
+
+            if self.rq.check_stamp_task(task, taskname, cache=self.stampcache):
+                logger.debug(2, 'Setscene stamp current task %s, so skip it and its dependencies', task)
+                self.sq_task_skip(task)
+                return True
+
+            if self.cooker.configuration.skipsetscene:
+                logger.debug(2, 'No setscene tasks should be executed. Skipping %s', task)
+                self.sq_task_failoutright(task)
+                return True
+
+            startevent = sceneQueueTaskStarted(task, self.sq_stats, self.rq)
+            bb.event.fire(startevent, self.cfgData)
+
+            taskdepdata = self.sq_build_taskdepdata(task)
+
+            taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
+            taskhash = self.rqdata.get_task_hash(task)
+            unihash = self.rqdata.get_task_unihash(task)
+            if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run:
+                if not mc in self.rq.fakeworker:
+                    self.rq.start_fakeworker(self, mc)
+                self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, unihash, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
+                self.rq.fakeworker[mc].process.stdin.flush()
+            else:
+                self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, unihash, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
+                self.rq.worker[mc].process.stdin.flush()
+
+            self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCaches[mc], taskfn, noextra=True)
+            self.build_stamps2.append(self.build_stamps[task])
+            self.sq_running.add(task)
+            self.sq_live.add(task)
+            self.sq_stats.taskActive()
+            if self.can_start_task():
+                return True
+
+        if not self.sq_live and not self.sqdone and not self.sq_deferred:
+            logger.info("Setscene tasks completed")
+            logger.debug(1, 'We could skip tasks %s', "\n".join(sorted(self.scenequeue_covered)))
+
+            completeevent = sceneQueueComplete(self.sq_stats, self.rq)
+            bb.event.fire(completeevent, self.cfgData)
+
+            err = False
+            for x in self.rqdata.runtaskentries:
+                if x not in self.tasks_covered and x not in self.tasks_notcovered:
+                    logger.error("Task %s was never moved from the setscene queue" % x)
+                    err = True
+                if x not in self.tasks_scenequeue_done:
+                    logger.error("Task %s was never processed by the setscene code" % x)
+                    err = True
+                if len(self.rqdata.runtaskentries[x].depends) == 0 and x not in self.runq_buildable:
+                    logger.error("Task %s was never marked as buildable by the setscene code" % x)
+                    err = True
+            if err:
+                self.rq.state = runQueueFailed
+                return True
+
+            if self.cooker.configuration.setsceneonly:
+                self.rq.state = runQueueComplete
+                return True
+            self.sqdone = True
+
+            if self.stats.total == 0:
+                # nothing to do
+                self.rq.state = runQueueComplete
+                return True
+
+        if self.cooker.configuration.setsceneonly:
+            task = None
+        else:
+            task = self.sched.next()
         if task is not None:
             (mc, fn, taskname, taskfn) = split_tid_mcfn(task)
 
-            if task in self.rq.scenequeue_covered:
+            if self.rqdata.setscenewhitelist is not None:
+                if self.check_setscenewhitelist(task):
+                    self.task_fail(task, "setscene whitelist")
+                    return True
+
+            if task in self.tasks_covered:
                 logger.debug(2, "Setscene covered task %s", task)
                 self.task_skip(task, "covered")
                 return True
@@ -2075,10 +2103,17 @@
             if self.can_start_task():
                 return True
 
-        if self.stats.active > 0:
+        if self.stats.active > 0 or self.sq_stats.active > 0:
             self.rq.read_workers()
             return self.rq.active_fds()
 
+        # No more tasks can be run. If we have deferred setscene tasks we should run them.
+        if self.sq_deferred:
+            tid = self.sq_deferred.pop(list(self.sq_deferred.keys())[0])
+            logger.warning("Runqeueue deadlocked on deferred tasks, forcing task %s" % tid)
+            self.sq_task_failoutright(tid)
+            return True
+
         if len(self.failed_tids) != 0:
             self.rq.state = runQueueFailed
             return True
@@ -2087,9 +2122,9 @@
         for task in self.rqdata.runtaskentries:
             if task not in self.runq_buildable:
                 logger.error("Task %s never buildable!", task)
-            if task not in self.runq_running:
+            elif task not in self.runq_running:
                 logger.error("Task %s never ran!", task)
-            if task not in self.runq_complete:
+            elif task not in self.runq_complete:
                 logger.error("Task %s never completed!", task)
         self.rq.state = runQueueComplete
 
@@ -2131,270 +2166,100 @@
         #bb.note("Task %s: " % task + str(taskdepdata).replace("], ", "],\n"))
         return taskdepdata
 
-class RunQueueExecuteScenequeue(RunQueueExecute):
-    def __init__(self, rq):
-        RunQueueExecute.__init__(self, rq)
-
-        self.scenequeue_covered = set()
-        self.scenequeue_notcovered = set()
-        self.scenequeue_notneeded = set()
-
-        # If we don't have any setscene functions, skip this step
-        if len(self.rqdata.runq_setscene_tids) == 0:
-            rq.scenequeue_covered = set()
-            rq.scenequeue_notcovered = set()
-            rq.state = runQueueRunInit
-            return
-
-        self.stats = RunQueueStats(len(self.rqdata.runq_setscene_tids))
-
-        sq_revdeps = {}
-        sq_revdeps_new = {}
-        sq_revdeps_squash = {}
-        self.sq_harddeps = {}
-        self.stamps = {}
-
-        # We need to construct a dependency graph for the setscene functions. Intermediate
-        # dependencies between the setscene tasks only complicate the code. This code
-        # therefore aims to collapse the huge runqueue dependency tree into a smaller one
-        # only containing the setscene functions.
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        # First process the chains up to the first setscene task.
-        endpoints = {}
-        for tid in self.rqdata.runtaskentries:
-            sq_revdeps[tid] = copy.copy(self.rqdata.runtaskentries[tid].revdeps)
-            sq_revdeps_new[tid] = set()
-            if (len(sq_revdeps[tid]) == 0) and tid not in self.rqdata.runq_setscene_tids:
-                #bb.warn("Added endpoint %s" % (tid))
-                endpoints[tid] = set()
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        # Secondly process the chains between setscene tasks.
-        for tid in self.rqdata.runq_setscene_tids:
-            #bb.warn("Added endpoint 2 %s" % (tid))
-            for dep in self.rqdata.runtaskentries[tid].depends:
-                    if tid in sq_revdeps[dep]:
-                        sq_revdeps[dep].remove(tid)
-                    if dep not in endpoints:
-                        endpoints[dep] = set()
-                    #bb.warn("  Added endpoint 3 %s" % (dep))
-                    endpoints[dep].add(tid)
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        def process_endpoints(endpoints):
-            newendpoints = {}
-            for point, task in endpoints.items():
-                tasks = set()
-                if task:
-                    tasks |= task
-                if sq_revdeps_new[point]:
-                    tasks |= sq_revdeps_new[point]
-                sq_revdeps_new[point] = set()
-                if point in self.rqdata.runq_setscene_tids:
-                    sq_revdeps_new[point] = tasks
-                    tasks = set()
-                    continue
-                for dep in self.rqdata.runtaskentries[point].depends:
-                    if point in sq_revdeps[dep]:
-                        sq_revdeps[dep].remove(point)
-                    if tasks:
-                        sq_revdeps_new[dep] |= tasks
-                    if len(sq_revdeps[dep]) == 0 and dep not in self.rqdata.runq_setscene_tids:
-                        newendpoints[dep] = task
-            if len(newendpoints) != 0:
-                process_endpoints(newendpoints)
-
-        process_endpoints(endpoints)
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        # Build a list of setscene tasks which are "unskippable"
-        # These are direct endpoints referenced by the build
-        endpoints2 = {}
-        sq_revdeps2 = {}
-        sq_revdeps_new2 = {}
-        def process_endpoints2(endpoints):
-            newendpoints = {}
-            for point, task in endpoints.items():
-                tasks = set([point])
-                if task:
-                    tasks |= task
-                if sq_revdeps_new2[point]:
-                    tasks |= sq_revdeps_new2[point]
-                sq_revdeps_new2[point] = set()
-                if point in self.rqdata.runq_setscene_tids:
-                    sq_revdeps_new2[point] = tasks
-                for dep in self.rqdata.runtaskentries[point].depends:
-                    if point in sq_revdeps2[dep]:
-                        sq_revdeps2[dep].remove(point)
-                    if tasks:
-                        sq_revdeps_new2[dep] |= tasks
-                    if (len(sq_revdeps2[dep]) == 0 or len(sq_revdeps_new2[dep]) != 0) and dep not in self.rqdata.runq_setscene_tids:
-                        newendpoints[dep] = tasks
-            if len(newendpoints) != 0:
-                process_endpoints2(newendpoints)
-        for tid in self.rqdata.runtaskentries:
-            sq_revdeps2[tid] = copy.copy(self.rqdata.runtaskentries[tid].revdeps)
-            sq_revdeps_new2[tid] = set()
-            if (len(sq_revdeps2[tid]) == 0) and tid not in self.rqdata.runq_setscene_tids:
-                endpoints2[tid] = set()
-        process_endpoints2(endpoints2)
-        self.unskippable = []
-        for tid in self.rqdata.runq_setscene_tids:
-            if sq_revdeps_new2[tid]:
-                self.unskippable.append(tid)
-
-        self.rqdata.init_progress_reporter.next_stage(len(self.rqdata.runtaskentries))
-
-        for taskcounter, tid in enumerate(self.rqdata.runtaskentries):
-            if tid in self.rqdata.runq_setscene_tids:
-                deps = set()
-                for dep in sq_revdeps_new[tid]:
-                    deps.add(dep)
-                sq_revdeps_squash[tid] = deps
-            elif len(sq_revdeps_new[tid]) != 0:
-                bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
-            self.rqdata.init_progress_reporter.update(taskcounter)
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        # Resolve setscene inter-task dependencies
-        # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene"
-        # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies
-        for tid in self.rqdata.runq_setscene_tids:
-                (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-                realtid = tid + "_setscene"
-                idepends = self.rqdata.taskData[mc].taskentries[realtid].idepends
-                self.stamps[tid] = bb.build.stampfile(taskname + "_setscene", self.rqdata.dataCaches[mc], taskfn, noextra=True)
-                for (depname, idependtask) in idepends:
-
-                    if depname not in self.rqdata.taskData[mc].build_targets:
+    def scenequeue_process_notcovered(self, task):
+        if len(self.rqdata.runtaskentries[task].depends) == 0:
+            self.setbuildable(task)
+        notcovered = set([task])
+        while notcovered:
+            new = set()
+            for t in notcovered:
+                for deptask in self.rqdata.runtaskentries[t].depends:
+                    if deptask in notcovered or deptask in new or deptask in self.rqdata.runq_setscene_tids or deptask in self.tasks_notcovered:
                         continue
+                    logger.debug(1, 'Task %s depends on non-setscene task %s so not skipping' % (t, deptask))
+                    new.add(deptask)
+                    self.tasks_notcovered.add(deptask)
+                    if len(self.rqdata.runtaskentries[deptask].depends) == 0:
+                        self.setbuildable(deptask)
+            notcovered = new
 
-                    depfn = self.rqdata.taskData[mc].build_targets[depname][0]
-                    if depfn is None:
-                         continue
-                    deptid = depfn + ":" + idependtask.replace("_setscene", "")
-                    if deptid not in self.rqdata.runtaskentries:
-                        bb.msg.fatal("RunQueue", "Task %s depends upon non-existent task %s:%s" % (realtid, depfn, idependtask))
+    def scenequeue_process_unskippable(self, task):
+        # Look up the dependency chain for non-setscene things which depend on this task
+        # and mark as 'done'/notcovered
+        ready = set([task])
+        while ready:
+            new = set()
+            for t in ready:
+                for deptask in self.rqdata.runtaskentries[t].revdeps:
+                    if deptask in ready or deptask in new or deptask in self.tasks_scenequeue_done or deptask in self.rqdata.runq_setscene_tids:
+                        continue
+                    if self.rqdata.runtaskentries[deptask].depends.issubset(self.tasks_scenequeue_done):
+                        new.add(deptask)
+                        self.tasks_scenequeue_done.add(deptask)
+                        self.tasks_notcovered.add(deptask)
+                        #logger.warning("Up: " + str(deptask))
+            ready = new
 
-                    if not deptid in self.sq_harddeps:
-                        self.sq_harddeps[deptid] = set()
-                    self.sq_harddeps[deptid].add(tid)
-
-                    sq_revdeps_squash[tid].add(deptid)
-                    # Have to zero this to avoid circular dependencies
-                    sq_revdeps_squash[deptid] = set()
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        for task in self.sq_harddeps:
-             for dep in self.sq_harddeps[task]:
-                 sq_revdeps_squash[dep].add(task)
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        #for tid in sq_revdeps_squash:
-        #    for dep in sq_revdeps_squash[tid]:
-        #        data = data + "\n   %s" % dep
-        #    bb.warn("Task %s_setscene: is %s " % (tid, data
-
-        self.sq_deps = {}
-        self.sq_revdeps = sq_revdeps_squash
-        self.sq_revdeps2 = copy.deepcopy(self.sq_revdeps)
-
-        for tid in self.sq_revdeps:
-            self.sq_deps[tid] = set()
-        for tid in self.sq_revdeps:
-            for dep in self.sq_revdeps[tid]:
-                self.sq_deps[dep].add(tid)
-
-        self.rqdata.init_progress_reporter.next_stage()
-
-        for tid in self.sq_revdeps:
-            if len(self.sq_revdeps[tid]) == 0:
-                self.runq_buildable.add(tid)
-
-        self.rqdata.init_progress_reporter.finish()
-
-        self.outrightfail = []
-        if self.rq.hashvalidate:
-            sq_hash = []
-            sq_hashfn = []
-            sq_unihash = []
-            sq_fn = []
-            sq_taskname = []
-            sq_task = []
-            noexec = []
-            stamppresent = []
-            for tid in self.sq_revdeps:
-                (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-
-                taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
-
-                if 'noexec' in taskdep and taskname in taskdep['noexec']:
-                    noexec.append(tid)
-                    self.task_skip(tid)
-                    bb.build.make_stamp(taskname + "_setscene", self.rqdata.dataCaches[mc], taskfn)
-                    continue
-
-                if self.rq.check_stamp_task(tid, taskname + "_setscene", cache=self.stampcache):
-                    logger.debug(2, 'Setscene stamp current for task %s', tid)
-                    stamppresent.append(tid)
-                    self.task_skip(tid)
-                    continue
-
-                if self.rq.check_stamp_task(tid, taskname, recurse = True, cache=self.stampcache):
-                    logger.debug(2, 'Normal stamp current for task %s', tid)
-                    stamppresent.append(tid)
-                    self.task_skip(tid)
-                    continue
-
-                sq_fn.append(fn)
-                sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
-                sq_hash.append(self.rqdata.runtaskentries[tid].hash)
-                sq_unihash.append(self.rqdata.runtaskentries[tid].unihash)
-                sq_taskname.append(taskname)
-                sq_task.append(tid)
-
-            self.cooker.data.setVar("BB_SETSCENE_STAMPCURRENT_COUNT", len(stamppresent))
-
-            valid = self.rq.validate_hash(sq_fn=sq_fn, sq_task=sq_taskname, sq_hash=sq_hash, sq_hashfn=sq_hashfn,
-                    siginfo=False, sq_unihash=sq_unihash, d=self.cooker.data)
-
-            self.cooker.data.delVar("BB_SETSCENE_STAMPCURRENT_COUNT")
-
-            valid_new = stamppresent
-            for v in valid:
-                valid_new.append(sq_task[v])
-
-            for tid in self.sq_revdeps:
-                if tid not in valid_new and tid not in noexec:
-                    logger.debug(2, 'No package found, so skipping setscene task %s', tid)
-                    self.outrightfail.append(tid)
-
-        logger.info('Executing SetScene Tasks')
-
-        self.rq.state = runQueueSceneRun
-
-    def scenequeue_updatecounters(self, task, fail = False):
-        for dep in self.sq_deps[task]:
-            if fail and task in self.sq_harddeps and dep in self.sq_harddeps[task]:
+    def scenequeue_updatecounters(self, task, fail=False):
+        for dep in self.sqdata.sq_deps[task]:
+            if fail and task in self.sqdata.sq_harddeps and dep in self.sqdata.sq_harddeps[task]:
                 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
-                self.scenequeue_updatecounters(dep, fail)
+                self.sq_task_failoutright(dep)
                 continue
-            if task not in self.sq_revdeps2[dep]:
+            if task not in self.sqdata.sq_revdeps2[dep]:
                 # May already have been removed by the fail case above
                 continue
-            self.sq_revdeps2[dep].remove(task)
-            if len(self.sq_revdeps2[dep]) == 0:
-                self.runq_buildable.add(dep)
+            self.sqdata.sq_revdeps2[dep].remove(task)
+            if len(self.sqdata.sq_revdeps2[dep]) == 0:
+                self.sq_buildable.add(dep)
 
-    def task_completeoutright(self, task):
+        next = set([task])
+        while next:
+            new = set()
+            for t in next:
+                self.tasks_scenequeue_done.add(t)
+                # Look down the dependency chain for non-setscene things which this task depends on
+                # and mark as 'done'
+                for dep in self.rqdata.runtaskentries[t].depends:
+                    if dep in self.rqdata.runq_setscene_tids or dep in self.tasks_scenequeue_done:
+                        continue
+                    if self.rqdata.runtaskentries[dep].revdeps.issubset(self.tasks_scenequeue_done):
+                        new.add(dep)
+                        #logger.warning(" Down: " + dep)
+            next = new
+
+        if task in self.sqdata.unskippable:
+            self.scenequeue_process_unskippable(task)
+
+        if task in self.scenequeue_notcovered:
+            logger.debug(1, 'Not skipping setscene task %s', task)
+            self.scenequeue_process_notcovered(task)
+        elif task in self.scenequeue_covered:
+            logger.debug(1, 'Queued setscene task %s', task)
+            self.coveredtopocess.add(task)
+
+        for task in self.coveredtopocess.copy():
+            if self.sqdata.sq_covered_tasks[task].issubset(self.tasks_scenequeue_done):
+                logger.debug(1, 'Processing setscene task %s', task)
+                covered = self.sqdata.sq_covered_tasks[task]
+                covered.add(task)
+
+                # If a task is in target_tids and isn't a setscene task, we can't skip it.
+                cantskip = covered.intersection(self.rqdata.target_tids).difference(self.rqdata.runq_setscene_tids)
+                for tid in cantskip:
+                    self.tasks_notcovered.add(tid)
+                    self.scenequeue_process_notcovered(tid)
+                covered.difference_update(cantskip)
+
+                # Remove notcovered tasks
+                covered.difference_update(self.tasks_notcovered)
+                self.tasks_covered.update(covered)
+                self.coveredtopocess.remove(task)
+                for tid in covered:
+                    if len(self.rqdata.runtaskentries[tid].depends) == 0:
+                        self.setbuildable(tid)
+
+    def sq_task_completeoutright(self, task):
         """
         Mark a task as completed
         Look at the reverse dependencies and mark any task with
@@ -2403,9 +2268,10 @@
 
         logger.debug(1, 'Found task %s which could be accelerated', task)
         self.scenequeue_covered.add(task)
+        self.tasks_covered.add(task)
         self.scenequeue_updatecounters(task)
 
-    def check_taskfail(self, task):
+    def sq_check_taskfail(self, task):
         if self.rqdata.setscenewhitelist is not None:
             realtask = task.split('_setscene')[0]
             (mc, fn, taskname, taskfn) = split_tid_mcfn(realtask)
@@ -2414,132 +2280,36 @@
                 logger.error('Task %s.%s failed' % (pn, taskname + "_setscene"))
                 self.rq.state = runQueueCleanUp
 
-    def task_complete(self, task):
-        self.stats.taskCompleted()
-        bb.event.fire(sceneQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)
-        self.task_completeoutright(task)
+    def sq_task_complete(self, task):
+        self.sq_stats.taskCompleted()
+        bb.event.fire(sceneQueueTaskCompleted(task, self.sq_stats, self.rq), self.cfgData)
+        self.sq_task_completeoutright(task)
 
-    def task_fail(self, task, result):
-        self.stats.taskFailed()
-        bb.event.fire(sceneQueueTaskFailed(task, self.stats, result, self), self.cfgData)
+    def sq_task_fail(self, task, result):
+        self.sq_stats.taskFailed()
+        bb.event.fire(sceneQueueTaskFailed(task, self.sq_stats, result, self), self.cfgData)
         self.scenequeue_notcovered.add(task)
+        self.tasks_notcovered.add(task)
         self.scenequeue_updatecounters(task, True)
-        self.check_taskfail(task)
+        self.sq_check_taskfail(task)
 
-    def task_failoutright(self, task):
-        self.runq_running.add(task)
-        self.runq_buildable.add(task)
-        self.stats.taskSkipped()
-        self.stats.taskCompleted()
+    def sq_task_failoutright(self, task):
+        self.sq_running.add(task)
+        self.sq_buildable.add(task)
+        self.sq_stats.taskSkipped()
+        self.sq_stats.taskCompleted()
         self.scenequeue_notcovered.add(task)
+        self.tasks_notcovered.add(task)
         self.scenequeue_updatecounters(task, True)
 
-    def task_skip(self, task):
-        self.runq_running.add(task)
-        self.runq_buildable.add(task)
-        self.task_completeoutright(task)
-        self.stats.taskSkipped()
-        self.stats.taskCompleted()
+    def sq_task_skip(self, task):
+        self.sq_running.add(task)
+        self.sq_buildable.add(task)
+        self.sq_task_completeoutright(task)
+        self.sq_stats.taskSkipped()
+        self.sq_stats.taskCompleted()
 
-    def execute(self):
-        """
-        Run the tasks in a queue prepared by prepare_runqueue
-        """
-
-        self.rq.read_workers()
-
-        task = None
-        if self.can_start_task():
-            # Find the next setscene to run
-            for nexttask in self.rqdata.runq_setscene_tids:
-                if nexttask in self.runq_buildable and nexttask not in self.runq_running and self.stamps[nexttask] not in self.build_stamps.values():
-                    if nexttask in self.unskippable:
-                        logger.debug(2, "Setscene task %s is unskippable" % nexttask)
-                    if nexttask not in self.unskippable and len(self.sq_revdeps[nexttask]) > 0 and self.sq_revdeps[nexttask].issubset(self.scenequeue_covered) and self.check_dependencies(nexttask, self.sq_revdeps[nexttask], True):
-                        fn = fn_from_tid(nexttask)
-                        foundtarget = False
-
-                        if nexttask in self.rqdata.target_tids:
-                            foundtarget = True
-                        if not foundtarget:
-                            logger.debug(2, "Skipping setscene for task %s" % nexttask)
-                            self.task_skip(nexttask)
-                            self.scenequeue_notneeded.add(nexttask)
-                            return True
-                    if nexttask in self.outrightfail:
-                        self.task_failoutright(nexttask)
-                        return True
-                    task = nexttask
-                    break
-        if task is not None:
-            (mc, fn, taskname, taskfn) = split_tid_mcfn(task)
-            taskname = taskname + "_setscene"
-            if self.rq.check_stamp_task(task, taskname_from_tid(task), recurse = True, cache=self.stampcache):
-                logger.debug(2, 'Stamp for underlying task %s is current, so skipping setscene variant', task)
-                self.task_failoutright(task)
-                return True
-
-            if self.cooker.configuration.force:
-                if task in self.rqdata.target_tids:
-                    self.task_failoutright(task)
-                    return True
-
-            if self.rq.check_stamp_task(task, taskname, cache=self.stampcache):
-                logger.debug(2, 'Setscene stamp current task %s, so skip it and its dependencies', task)
-                self.task_skip(task)
-                return True
-
-            startevent = sceneQueueTaskStarted(task, self.stats, self.rq)
-            bb.event.fire(startevent, self.cfgData)
-
-            taskdepdata = self.build_taskdepdata(task)
-
-            taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
-            taskhash = self.rqdata.get_task_hash(task)
-            unihash = self.rqdata.get_task_unihash(task)
-            if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run:
-                if not mc in self.rq.fakeworker:
-                    self.rq.start_fakeworker(self, mc)
-                self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, unihash, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
-                self.rq.fakeworker[mc].process.stdin.flush()
-            else:
-                self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, unihash, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
-                self.rq.worker[mc].process.stdin.flush()
-
-            self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCaches[mc], taskfn, noextra=True)
-            self.build_stamps2.append(self.build_stamps[task])
-            self.runq_running.add(task)
-            self.stats.taskActive()
-            if self.can_start_task():
-                return True
-
-        if self.stats.active > 0:
-            self.rq.read_workers()
-            return self.rq.active_fds()
-
-        #for tid in self.sq_revdeps:
-        #    if tid not in self.runq_running:
-        #        buildable = tid in self.runq_buildable
-        #        revdeps = self.sq_revdeps[tid]
-        #        bb.warn("Found we didn't run %s %s %s" % (tid, buildable, str(revdeps)))
-
-        self.rq.scenequeue_covered = self.scenequeue_covered
-        self.rq.scenequeue_notcovered = self.scenequeue_notcovered
-
-        logger.debug(1, 'We can skip tasks %s', "\n".join(sorted(self.rq.scenequeue_covered)))
-
-        self.rq.state = runQueueRunInit
-
-        completeevent = sceneQueueComplete(self.stats, self.rq)
-        bb.event.fire(completeevent, self.cfgData)
-
-        return True
-
-    def runqueue_process_waitpid(self, task, status):
-        RunQueueExecute.runqueue_process_waitpid(self, task, status)
-
-
-    def build_taskdepdata(self, task):
+    def sq_build_taskdepdata(self, task):
         def getsetscenedeps(tid):
             deps = set()
             (mc, fn, taskname, _) = split_tid_mcfn(tid)
@@ -2577,6 +2347,268 @@
         #bb.note("Task %s: " % task + str(taskdepdata).replace("], ", "],\n"))
         return taskdepdata
 
+    def check_setscenewhitelist(self, tid):
+        # Check task that is going to run against the whitelist
+        (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+        # Ignore covered tasks
+        if tid in self.tasks_covered:
+            return False
+        # Ignore stamped tasks
+        if self.rq.check_stamp_task(tid, taskname, cache=self.stampcache):
+            return False
+        # Ignore noexec tasks
+        taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
+        if 'noexec' in taskdep and taskname in taskdep['noexec']:
+            return False
+
+        pn = self.rqdata.dataCaches[mc].pkg_fn[taskfn]
+        if not check_setscene_enforce_whitelist(pn, taskname, self.rqdata.setscenewhitelist):
+            if tid in self.rqdata.runq_setscene_tids:
+                msg = 'Task %s.%s attempted to execute unexpectedly and should have been setscened' % (pn, taskname)
+            else:
+                msg = 'Task %s.%s attempted to execute unexpectedly' % (pn, taskname)
+            logger.error(msg + '\nThis is usually due to missing setscene tasks. Those missing in this build were: %s' % pprint.pformat(self.scenequeue_notcovered))
+            return True
+        return False
+
+class SQData(object):
+    def __init__(self):
+        # SceneQueue dependencies
+        self.sq_deps = {}
+        # SceneQueue reverse dependencies
+        self.sq_revdeps = {}
+        # Copy of reverse dependencies used by sq processing code
+        self.sq_revdeps2 = {}
+        # Injected inter-setscene task dependencies
+        self.sq_harddeps = {}
+        # Cache of stamp files so duplicates can't run in parallel
+        self.stamps = {}
+        # Setscene tasks directly depended upon by the build
+        self.unskippable = set()
+        # List of setscene tasks which aren't present
+        self.outrightfail = set()
+        # A list of normal tasks a setscene task covers
+        self.sq_covered_tasks = {}
+
+def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
+
+    sq_revdeps = {}
+    sq_revdeps_squash = {}
+    sq_collated_deps = {}
+
+    # We need to construct a dependency graph for the setscene functions. Intermediate
+    # dependencies between the setscene tasks only complicate the code. This code
+    # therefore aims to collapse the huge runqueue dependency tree into a smaller one
+    # only containing the setscene functions.
+
+    rqdata.init_progress_reporter.next_stage()
+
+    # First process the chains up to the first setscene task.
+    endpoints = {}
+    for tid in rqdata.runtaskentries:
+        sq_revdeps[tid] = copy.copy(rqdata.runtaskentries[tid].revdeps)
+        sq_revdeps_squash[tid] = set()
+        if (len(sq_revdeps[tid]) == 0) and tid not in rqdata.runq_setscene_tids:
+            #bb.warn("Added endpoint %s" % (tid))
+            endpoints[tid] = set()
+
+    rqdata.init_progress_reporter.next_stage()
+
+    # Secondly process the chains between setscene tasks.
+    for tid in rqdata.runq_setscene_tids:
+        sq_collated_deps[tid] = set()
+        #bb.warn("Added endpoint 2 %s" % (tid))
+        for dep in rqdata.runtaskentries[tid].depends:
+                if tid in sq_revdeps[dep]:
+                    sq_revdeps[dep].remove(tid)
+                if dep not in endpoints:
+                    endpoints[dep] = set()
+                #bb.warn("  Added endpoint 3 %s" % (dep))
+                endpoints[dep].add(tid)
+
+    rqdata.init_progress_reporter.next_stage()
+
+    def process_endpoints(endpoints):
+        newendpoints = {}
+        for point, task in endpoints.items():
+            tasks = set()
+            if task:
+                tasks |= task
+            if sq_revdeps_squash[point]:
+                tasks |= sq_revdeps_squash[point]
+            if point not in rqdata.runq_setscene_tids:
+                for t in tasks:
+                    sq_collated_deps[t].add(point)
+            sq_revdeps_squash[point] = set()
+            if point in rqdata.runq_setscene_tids:
+                sq_revdeps_squash[point] = tasks
+                tasks = set()
+                continue
+            for dep in rqdata.runtaskentries[point].depends:
+                if point in sq_revdeps[dep]:
+                    sq_revdeps[dep].remove(point)
+                if tasks:
+                    sq_revdeps_squash[dep] |= tasks
+                if len(sq_revdeps[dep]) == 0 and dep not in rqdata.runq_setscene_tids:
+                    newendpoints[dep] = task
+        if len(newendpoints) != 0:
+            process_endpoints(newendpoints)
+
+    process_endpoints(endpoints)
+
+    rqdata.init_progress_reporter.next_stage()
+
+    # Build a list of setscene tasks which are "unskippable"
+    # These are direct endpoints referenced by the build
+    # Take the build endpoints (no revdeps) and find the sstate tasks they depend upon
+    new = True
+    for tid in rqdata.runtaskentries:
+        if len(rqdata.runtaskentries[tid].revdeps) == 0:
+            sqdata.unskippable.add(tid)
+    while new:
+        new = False
+        for tid in sqdata.unskippable.copy():
+            if tid in rqdata.runq_setscene_tids:
+                continue
+            sqdata.unskippable.remove(tid)
+            if len(rqdata.runtaskentries[tid].depends) == 0:
+                # These are tasks which have no setscene tasks in their chain, need to mark as directly buildable
+                sqrq.tasks_notcovered.add(tid)
+                sqrq.tasks_scenequeue_done.add(tid)
+                sqrq.setbuildable(tid)
+                sqrq.scenequeue_process_unskippable(tid)
+            sqdata.unskippable |= rqdata.runtaskentries[tid].depends
+            new = True
+
+    rqdata.init_progress_reporter.next_stage(len(rqdata.runtaskentries))
+
+    # Sanity check all dependencies could be changed to setscene task references
+    for taskcounter, tid in enumerate(rqdata.runtaskentries):
+        if tid in rqdata.runq_setscene_tids:
+            pass
+        elif len(sq_revdeps_squash[tid]) != 0:
+            bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
+        else:
+            del sq_revdeps_squash[tid]
+        rqdata.init_progress_reporter.update(taskcounter)
+
+    rqdata.init_progress_reporter.next_stage()
+
+    # Resolve setscene inter-task dependencies
+    # e.g. do_sometask_setscene[depends] = "targetname:do_someothertask_setscene"
+    # Note that anything explicitly depended upon will have its reverse dependencies removed to avoid circular dependencies
+    for tid in rqdata.runq_setscene_tids:
+        (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+        realtid = tid + "_setscene"
+        idepends = rqdata.taskData[mc].taskentries[realtid].idepends
+        sqdata.stamps[tid] = bb.build.stampfile(taskname + "_setscene", rqdata.dataCaches[mc], taskfn, noextra=True)
+        for (depname, idependtask) in idepends:
+
+            if depname not in rqdata.taskData[mc].build_targets:
+                continue
+
+            depfn = rqdata.taskData[mc].build_targets[depname][0]
+            if depfn is None:
+                continue
+            deptid = depfn + ":" + idependtask.replace("_setscene", "")
+            if deptid not in rqdata.runtaskentries:
+                bb.msg.fatal("RunQueue", "Task %s depends upon non-existent task %s:%s" % (realtid, depfn, idependtask))
+
+            if not deptid in sqdata.sq_harddeps:
+                sqdata.sq_harddeps[deptid] = set()
+            sqdata.sq_harddeps[deptid].add(tid)
+
+            sq_revdeps_squash[tid].add(deptid)
+            # Have to zero this to avoid circular dependencies
+            sq_revdeps_squash[deptid] = set()
+
+    rqdata.init_progress_reporter.next_stage()
+
+    for task in sqdata.sq_harddeps:
+        for dep in sqdata.sq_harddeps[task]:
+            sq_revdeps_squash[dep].add(task)
+
+    rqdata.init_progress_reporter.next_stage()
+
+    #for tid in sq_revdeps_squash:
+    #    data = ""
+    #    for dep in sq_revdeps_squash[tid]:
+    #        data = data + "\n   %s" % dep
+    #    bb.warn("Task %s_setscene: is %s " % (tid, data))
+
+    sqdata.sq_revdeps = sq_revdeps_squash
+    sqdata.sq_revdeps2 = copy.deepcopy(sqdata.sq_revdeps)
+    sqdata.sq_covered_tasks = sq_collated_deps
+
+    # Build reverse version of revdeps to populate deps structure
+    for tid in sqdata.sq_revdeps:
+        sqdata.sq_deps[tid] = set()
+    for tid in sqdata.sq_revdeps:
+        for dep in sqdata.sq_revdeps[tid]:
+            sqdata.sq_deps[dep].add(tid)
+
+    rqdata.init_progress_reporter.next_stage()
+
+    multiconfigs = set()
+    for tid in sqdata.sq_revdeps:
+        multiconfigs.add(mc_from_tid(tid))
+        if len(sqdata.sq_revdeps[tid]) == 0:
+            sqrq.sq_buildable.add(tid)
+
+    rqdata.init_progress_reporter.finish()
+
+    if rq.hashvalidate:
+        noexec = []
+        stamppresent = []
+        tocheck = set()
+
+        for tid in sqdata.sq_revdeps:
+            (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+
+            taskdep = rqdata.dataCaches[mc].task_deps[taskfn]
+
+            if 'noexec' in taskdep and taskname in taskdep['noexec']:
+                noexec.append(tid)
+                sqrq.sq_task_skip(tid)
+                bb.build.make_stamp(taskname + "_setscene", rqdata.dataCaches[mc], taskfn)
+                continue
+
+            if rq.check_stamp_task(tid, taskname + "_setscene", cache=stampcache):
+                logger.debug(2, 'Setscene stamp current for task %s', tid)
+                stamppresent.append(tid)
+                sqrq.sq_task_skip(tid)
+                continue
+
+            if rq.check_stamp_task(tid, taskname, recurse = True, cache=stampcache):
+                logger.debug(2, 'Normal stamp current for task %s', tid)
+                stamppresent.append(tid)
+                sqrq.sq_task_skip(tid)
+                continue
+
+            tocheck.add(tid)
+
+        valid = rq.validate_hashes(tocheck, cooker.data, len(stamppresent), False)
+
+        valid_new = stamppresent
+        for v in valid:
+            valid_new.append(v)
+
+        hashes = {}
+        for mc in sorted(multiconfigs):
+          for tid in sqdata.sq_revdeps:
+            if mc_from_tid(tid) != mc:
+                continue
+            if tid not in valid_new and tid not in noexec and tid not in sqrq.scenequeue_notcovered:
+                sqdata.outrightfail.add(tid)
+
+                h = pending_hash_index(tid, rqdata)
+                if h not in hashes:
+                    hashes[h] = tid
+                else:
+                    sqrq.sq_deferred[tid] = hashes[h]
+                    bb.warn("Deferring %s after %s" % (tid, hashes[h]))
+
+
 class TaskFailure(Exception):
     """
     Exception raised when a task in a runqueue fails
diff --git a/poky/bitbake/lib/bb/siggen.py b/poky/bitbake/lib/bb/siggen.py
index fe580e4..6a729f3 100644
--- a/poky/bitbake/lib/bb/siggen.py
+++ b/poky/bitbake/lib/bb/siggen.py
@@ -49,7 +49,9 @@
         return self.taskhash[task]
 
     def get_taskhash(self, fn, task, deps, dataCache):
-        return "0"
+        k = fn + "." + task
+        self.taskhash[k] = hashlib.sha256(k.encode("utf-8")).hexdigest()
+        return self.taskhash[k]
 
     def writeout_file_checksum_cache(self):
         """Write/update the file checksum cache onto disk"""
@@ -643,9 +645,9 @@
     a_taint = a_data.get('taint', None)
     b_taint = b_data.get('taint', None)
     if a_taint != b_taint:
-        if a_taint.startswith('nostamp:'):
+        if a_taint and a_taint.startswith('nostamp:'):
             a_taint = a_taint.replace('nostamp:', 'nostamp(uuid4):')
-        if b_taint.startswith('nostamp:'):
+        if b_taint and b_taint.startswith('nostamp:'):
             b_taint = b_taint.replace('nostamp:', 'nostamp(uuid4):')
         output.append(color_format("{color_title}Taint (by forced/invalidated task) changed{color_default} from %s to %s") % (a_taint, b_taint))
 
diff --git a/poky/bitbake/lib/bb/taskdata.py b/poky/bitbake/lib/bb/taskdata.py
index d13bd7c..8c25e09 100644
--- a/poky/bitbake/lib/bb/taskdata.py
+++ b/poky/bitbake/lib/bb/taskdata.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 """
 BitBake 'TaskData' implementation
 
diff --git a/poky/bitbake/lib/bb/tests/event.py b/poky/bitbake/lib/bb/tests/event.py
index b6e40c6..9229b63 100644
--- a/poky/bitbake/lib/bb/tests/event.py
+++ b/poky/bitbake/lib/bb/tests/event.py
@@ -561,14 +561,6 @@
         self.assertEqual(event.fn(1), callback(1))
         self.assertEqual(event.pid, EventClassesTest._worker_pid)
 
-    def test_StampUpdate(self):
-        targets = ["foo", "bar"]
-        stampfns = [lambda:"foobar"]
-        event = bb.event.StampUpdate(targets, stampfns)
-        self.assertEqual(event.targets, targets)
-        self.assertEqual(event.stampPrefix, stampfns)
-        self.assertEqual(event.pid, EventClassesTest._worker_pid)
-
     def test_BuildBase(self):
         """ Test base class for bitbake build events """
         name = "foo"
diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py
index 16f975b..23c6338 100644
--- a/poky/bitbake/lib/bb/tests/fetch.py
+++ b/poky/bitbake/lib/bb/tests/fetch.py
@@ -899,6 +899,7 @@
         if os.path.exists(os.path.join(repo_path, 'bitbake-gitsm-test1')):
             self.assertTrue(os.path.exists(os.path.join(repo_path, 'bitbake-gitsm-test1', 'bitbake')), msg='submodule of submodule missing')
 
+    @skipIfNoNetwork()
     def test_git_submodule_dbus_broker(self):
         # The following external repositories have show failures in fetch and unpack operations
         # We want to avoid regressions!
@@ -916,6 +917,7 @@
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-sundry/config')), msg='Missing submodule config "subprojects/c-sundry"')
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/subprojects/c-utf8/config')), msg='Missing submodule config "subprojects/c-utf8"')
 
+    @skipIfNoNetwork()
     def test_git_submodule_CLI11(self):
         url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=bd4dc911847d0cde7a6b41dfa626a85aab213baf"
         fetcher = bb.fetch.Fetch([url], self.d)
@@ -929,6 +931,7 @@
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/json/config')), msg='Missing submodule config "extern/json"')
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/sanitizers/config')), msg='Missing submodule config "extern/sanitizers"')
 
+    @skipIfNoNetwork()
     def test_git_submodule_update_CLI11(self):
         """ Prevent regression on update detection not finding missing submodule, or modules without needed commits """
         url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=cf6a99fa69aaefe477cc52e3ef4a7d2d7fa40714"
@@ -948,6 +951,7 @@
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/json/config')), msg='Missing submodule config "extern/json"')
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/extern/sanitizers/config')), msg='Missing submodule config "extern/sanitizers"')
 
+    @skipIfNoNetwork()
     def test_git_submodule_aktualizr(self):
         url = "gitsm://github.com/advancedtelematic/aktualizr;branch=master;protocol=git;rev=d00d1a04cc2366d1a5f143b84b9f507f8bd32c44"
         fetcher = bb.fetch.Fetch([url], self.d)
@@ -964,6 +968,7 @@
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/third_party/googletest/config')), msg='Missing submodule config "third_party/googletest/config"')
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/third_party/HdrHistogram_c/config')), msg='Missing submodule config "third_party/HdrHistogram_c/config"')
 
+    @skipIfNoNetwork()
     def test_git_submodule_iotedge(self):
         """ Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """
 
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass b/poky/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass
new file mode 100644
index 0000000..5b87e20
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass
@@ -0,0 +1,242 @@
+SLOWTASKS ??= ""
+SSTATEVALID ??= ""
+
+def stamptask(d):
+    import time
+
+    thistask = d.expand("${PN}:${BB_CURRENTTASK}")
+    with open(d.expand("${TOPDIR}/%s.run") % thistask, "a+") as f:
+        f.write("\n")
+
+    if d.getVar("BB_CURRENT_MC") != "default":
+        thistask = d.expand("${BB_CURRENT_MC}:${PN}:${BB_CURRENTTASK}")
+    if thistask in d.getVar("SLOWTASKS").split():
+        bb.note("Slowing task %s" % thistask)
+        time.sleep(0.5)
+
+    with open(d.expand("${TOPDIR}/task.log"), "a+") as f:
+        f.write(thistask + "\n")
+
+python do_fetch() {
+    # fetch
+    stamptask(d)
+}
+python do_unpack() {
+    # unpack
+    stamptask(d)
+}
+python do_patch() {
+    # patch
+    stamptask(d)
+}
+python do_populate_lic() {
+    # populate_lic
+    stamptask(d)
+}
+python do_prepare_recipe_sysroot() {
+    # prepare_recipe_sysroot
+    stamptask(d)
+}
+python do_configure() {
+    # configure
+    stamptask(d)
+}
+python do_compile() {
+    # compile
+    stamptask(d)
+}
+python do_install() {
+    # install
+    stamptask(d)
+}
+python do_populate_sysroot() {
+    # populate_sysroot
+    stamptask(d)
+}
+python do_package() {
+    # package
+    stamptask(d)
+}
+python do_package_write_ipk() {
+    # package_write_ipk
+    stamptask(d)
+}
+python do_package_write_rpm() {
+    # package_write_rpm
+    stamptask(d)
+}
+python do_packagedata() {
+    # packagedata
+    stamptask(d)
+}
+python do_package_qa() {
+    # package_qa
+    stamptask(d)
+}
+python do_build() {
+    # build
+    stamptask(d)
+}
+do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot"
+do_package[deptask] += "do_packagedata"
+do_build[recrdeptask] += "do_deploy"
+do_build[recrdeptask] += "do_package_write_ipk"
+do_build[recrdeptask] += "do_package_write_rpm"
+do_package_qa[rdeptask] = "do_packagedata"
+do_populate_lic_deploy[recrdeptask] += "do_populate_lic do_deploy"
+
+DEBIANRDEP = "do_packagedata"
+oo_package_write_ipk[rdeptask] = "${DEBIANRDEP}"
+do_package_write_rpm[rdeptask] = "${DEBIANRDEP}"
+
+addtask fetch
+addtask unpack after do_fetch
+addtask patch after do_unpack
+addtask prepare_recipe_sysroot after do_patch
+addtask configure after do_prepare_recipe_sysroot
+addtask compile after do_configure
+addtask install after do_compile
+addtask populate_sysroot after do_install
+addtask package after do_install
+addtask package_write_ipk after do_packagedata do_package
+addtask package_write_rpm after do_packagedata do_package
+addtask packagedata after do_package
+addtask package_qa after do_package
+addtask build after do_package_qa do_package_write_rpm do_package_write_ipk do_populate_sysroot
+
+python do_package_setscene() {
+    stamptask(d)
+}
+python do_package_qa_setscene() {
+    stamptask(d)
+}
+python do_package_write_ipk_setscene() {
+    stamptask(d)
+}
+python do_package_write_rpm_setscene() {
+    stamptask(d)
+}
+python do_packagedata_setscene() {
+    stamptask(d)
+}
+python do_populate_lic_setscene() {
+    stamptask(d)
+}
+python do_populate_sysroot_setscene() {
+    stamptask(d)
+}
+
+addtask package_setscene
+addtask package_qa_setscene
+addtask package_write_ipk_setscene
+addtask package_write_rpm_setscene
+addtask packagedata_setscene
+addtask populate_lic_setscene
+addtask populate_sysroot_setscene
+
+BB_SETSCENE_DEPVALID = "setscene_depvalid"
+
+def setscene_depvalid(task, taskdependees, notneeded, d, log=None):
+    # taskdependees is a dict of tasks which depend on task, each being a 3 item list of [PN, TASKNAME, FILENAME]
+    # task is included in taskdependees too
+    # Return - False - We need this dependency
+    #        - True - We can skip this dependency
+    import re
+
+    def logit(msg, log):
+        if log is not None:
+            log.append(msg)
+        else:
+            bb.debug(2, msg)
+
+    logit("Considering setscene task: %s" % (str(taskdependees[task])), log)
+
+    def isNativeCross(x):
+        return x.endswith("-native") or "-cross-" in x or "-crosssdk" in x or x.endswith("-cross")
+
+    # We only need to trigger populate_lic through direct dependencies
+    if taskdependees[task][1] == "do_populate_lic":
+        return True
+
+    # We only need to trigger packagedata through direct dependencies
+    # but need to preserve packagedata on packagedata links
+    if taskdependees[task][1] == "do_packagedata":
+        for dep in taskdependees:
+            if taskdependees[dep][1] == "do_packagedata":
+                return False
+        return True
+
+    for dep in taskdependees:
+        logit("  considering dependency: %s" % (str(taskdependees[dep])), log)
+        if task == dep:
+            continue
+        if dep in notneeded:
+            continue
+        # do_package_write_* and do_package doesn't need do_package
+        if taskdependees[task][1] == "do_package" and taskdependees[dep][1] in ['do_package', 'do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package_qa']:
+            continue
+        # do_package_write_* need do_populate_sysroot as they're mainly postinstall dependencies
+        if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package_write_ipk', 'do_package_write_rpm']:
+            return False
+        # do_package/packagedata/package_qa don't need do_populate_sysroot
+        if taskdependees[task][1] == "do_populate_sysroot" and taskdependees[dep][1] in ['do_package', 'do_packagedata', 'do_package_qa']:
+            continue
+        # Native/Cross packages don't exist and are noexec anyway
+        if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_ipk', 'do_package_write_rpm', 'do_packagedata', 'do_package', 'do_package_qa']:
+            continue
+
+        # This is due to the [depends] in useradd.bbclass complicating matters
+        # The logic *is* reversed here due to the way hard setscene dependencies are injected
+        if (taskdependees[task][1] == 'do_package' or taskdependees[task][1] == 'do_populate_sysroot') and taskdependees[dep][0].endswith(('shadow-native', 'shadow-sysroot', 'base-passwd', 'pseudo-native')) and taskdependees[dep][1] == 'do_populate_sysroot':
+            continue
+
+        # Consider sysroot depending on sysroot tasks
+        if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot':
+            # Native/Cross populate_sysroot need their dependencies
+            if isNativeCross(taskdependees[task][0]) and isNativeCross(taskdependees[dep][0]):
+                return False
+            # Target populate_sysroot depended on by cross tools need to be installed
+            if isNativeCross(taskdependees[dep][0]):
+                return False
+            # Native/cross tools depended upon by target sysroot are not needed
+            # Add an exception for shadow-native as required by useradd.bbclass
+            if isNativeCross(taskdependees[task][0]) and taskdependees[task][0] != 'shadow-native':
+                continue
+            # Target populate_sysroot need their dependencies
+            return False
+
+
+        if taskdependees[dep][1] == "do_populate_lic":
+            continue
+
+        # Safe fallthrough default
+        logit(" Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep])), log)
+        return False
+    return True
+
+BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
+
+def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False, *, sq_unihash=None):
+
+    ret = []
+    missed = []
+
+    valid = d.getVar("SSTATEVALID").split()
+
+    for task in range(len(sq_fn)):
+        n = os.path.basename(sq_fn[task]).rsplit(".", 1)[0] + ":" + sq_task[task]
+        if n in valid:
+            bb.note("SState: Found valid sstate for %s" % n)
+            ret.append(task)
+        elif os.path.exists(d.expand("${TOPDIR}/%s.run" % n.replace("do_", ""))):
+            bb.note("SState: Found valid sstate for %s (already run)" % n)
+            ret.append(task)
+        else:
+            missed.append(task)
+            bb.note("SState: Found no valid sstate for %s" % n)
+
+    if hasattr(bb.parse.siggen, "checkhashes"):
+        bb.parse.siggen.checkhashes(missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d)
+
+    return ret
+
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/classes/image.bbclass b/poky/bitbake/lib/bb/tests/runqueue-tests/classes/image.bbclass
new file mode 100644
index 0000000..da9ff11
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/classes/image.bbclass
@@ -0,0 +1,5 @@
+do_rootfs[recrdeptask] += "do_package_write_deb do_package_qa"
+do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa"
+do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa
+do_rootfs[recrdeptask] += "do_packagedata"
+do_rootfs[recrdeptask] += "do_populate_lic"
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/classes/native.bbclass b/poky/bitbake/lib/bb/tests/runqueue-tests/classes/native.bbclass
new file mode 100644
index 0000000..7eaaee5
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/classes/native.bbclass
@@ -0,0 +1,2 @@
+RECIPERDEPTASK = "do_populate_sysroot"
+do_populate_sysroot[rdeptask] = "${RECIPERDEPTASK}"
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf b/poky/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf
new file mode 100644
index 0000000..96ee1cd
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf
@@ -0,0 +1,16 @@
+CACHE = "${TOPDIR}/cache"
+THISDIR = "${@os.path.dirname(d.getVar('FILE'))}"
+COREBASE := "${@os.path.normpath(os.path.dirname(d.getVar('FILE')+'/../../'))}"
+BBFILES = "${COREBASE}/recipes/*.bb"
+PROVIDES = "${PN}"
+PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0]}"
+PF = "${BB_CURRENT_MC}:${PN}"
+export PATH
+TMPDIR ??= "${TOPDIR}"
+STAMP = "${TMPDIR}/stamps/${PN}"
+T = "${TMPDIR}/workdir/${PN}/temp"
+BB_NUMBER_THREADS = "4"
+
+BB_HASHBASE_WHITELIST = "BB_CURRENT_MC"
+
+include conf/multiconfig/${BB_CURRENT_MC}.conf
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/conf/multiconfig/mc1.conf b/poky/bitbake/lib/bb/tests/runqueue-tests/conf/multiconfig/mc1.conf
new file mode 100644
index 0000000..ecf23e1
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/conf/multiconfig/mc1.conf
@@ -0,0 +1 @@
+TMPDIR = "${TOPDIR}/mc1/"
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/conf/multiconfig/mc2.conf b/poky/bitbake/lib/bb/tests/runqueue-tests/conf/multiconfig/mc2.conf
new file mode 100644
index 0000000..eef338e
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/conf/multiconfig/mc2.conf
@@ -0,0 +1 @@
+TMPDIR = "${TOPDIR}/mc2/"
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/a1.bb b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/a1.bb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/a1.bb
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/b1.bb b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/b1.bb
new file mode 100644
index 0000000..c0b288e
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/b1.bb
@@ -0,0 +1 @@
+DEPENDS = "a1"
\ No newline at end of file
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/c1.bb b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/c1.bb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/c1.bb
diff --git a/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/d1.bb b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/d1.bb
new file mode 100644
index 0000000..5ba1975
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue-tests/recipes/d1.bb
@@ -0,0 +1,3 @@
+DEPENDS = "a1"
+
+do_package_setscene[depends] = "a1:do_populate_sysroot_setscene"
diff --git a/poky/bitbake/lib/bb/tests/runqueue.py b/poky/bitbake/lib/bb/tests/runqueue.py
new file mode 100644
index 0000000..f22ad4b
--- /dev/null
+++ b/poky/bitbake/lib/bb/tests/runqueue.py
@@ -0,0 +1,228 @@
+#
+# BitBake Tests for runqueue task processing
+#
+# Copyright (C) 2019 Richard Purdie
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import unittest
+import bb
+import os
+import tempfile
+import subprocess
+
+#
+# TODO:
+# Add tests on task ordering (X happens before Y after Z)
+#
+
+class RunQueueTests(unittest.TestCase):
+
+    alltasks = ['package', 'fetch', 'unpack', 'patch', 'prepare_recipe_sysroot', 'configure',
+                'compile', 'install', 'packagedata', 'package_qa', 'package_write_rpm', 'package_write_ipk',
+                'populate_sysroot', 'build']
+    a1_sstatevalid = "a1:do_package a1:do_package_qa a1:do_packagedata a1:do_package_write_ipk a1:do_package_write_rpm a1:do_populate_lic a1:do_populate_sysroot"
+    b1_sstatevalid = "b1:do_package b1:do_package_qa b1:do_packagedata b1:do_package_write_ipk b1:do_package_write_rpm b1:do_populate_lic b1:do_populate_sysroot"
+
+    def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None):
+        env = os.environ.copy()
+        env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests"))
+        env["BB_ENV_EXTRAWHITE"] = "SSTATEVALID SLOWTASKS"
+        env["SSTATEVALID"] = sstatevalid
+        env["SLOWTASKS"] = slowtasks
+        if extraenv:
+            for k in extraenv:
+                env[k] = extraenv[k]
+                env["BB_ENV_EXTRAWHITE"] = env["BB_ENV_EXTRAWHITE"] + " " + k
+        try:
+            output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir)
+        except subprocess.CalledProcessError as e:
+            self.fail("Command %s failed with %s" % (cmd, e.output))
+        tasks = []
+        with open(builddir + "/task.log", "r") as f:
+            tasks = [line.rstrip() for line in f]
+        return tasks
+
+    def test_no_setscenevalid(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            sstatevalid = ""
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:' + x for x in self.alltasks]
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_single_setscenevalid(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            sstatevalid = "a1:do_package"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_setscene', 'a1:fetch', 'a1:unpack', 'a1:patch', 'a1:prepare_recipe_sysroot', 'a1:configure',
+                        'a1:compile', 'a1:install', 'a1:packagedata', 'a1:package_qa', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot', 'a1:build']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_intermediate_setscenevalid(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            sstatevalid = "a1:do_package a1:do_populate_sysroot"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_setscene', 'a1:packagedata', 'a1:package_qa', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot_setscene', 'a1:build']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_intermediate_notcovered(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            sstatevalid = "a1:do_package_qa a1:do_packagedata a1:do_package_write_ipk a1:do_package_write_rpm a1:do_populate_lic a1:do_populate_sysroot"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_write_ipk_setscene', 'a1:package_write_rpm_setscene', 'a1:packagedata_setscene',
+                        'a1:package_qa_setscene', 'a1:build', 'a1:populate_sysroot_setscene']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_all_setscenevalid(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            sstatevalid = self.a1_sstatevalid
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_write_ipk_setscene', 'a1:package_write_rpm_setscene', 'a1:packagedata_setscene',
+                        'a1:package_qa_setscene', 'a1:build', 'a1:populate_sysroot_setscene']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_no_settasks(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1", "-c", "patch"]
+            sstatevalid = self.a1_sstatevalid
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:fetch', 'a1:unpack', 'a1:patch']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_mix_covered_notcovered(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1:do_patch", "a1:do_populate_sysroot"]
+            sstatevalid = self.a1_sstatevalid
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:fetch', 'a1:unpack', 'a1:patch', 'a1:populate_sysroot_setscene']
+            self.assertEqual(set(tasks), set(expected))
+
+
+    # Test targets with intermediate setscene tasks alongside a target with no intermediate setscene tasks
+    def test_mixed_direct_tasks_setscene_tasks(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "c1:do_patch", "a1"]
+            sstatevalid = self.a1_sstatevalid
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['c1:fetch', 'c1:unpack', 'c1:patch', 'a1:package_write_ipk_setscene', 'a1:package_write_rpm_setscene', 'a1:packagedata_setscene',
+                        'a1:package_qa_setscene', 'a1:build', 'a1:populate_sysroot_setscene']
+            self.assertEqual(set(tasks), set(expected))
+
+    # This test slows down the execution of do_package_setscene until after other real tasks have
+    # started running which tests for a bug where tasks were being lost from the buildable list of real
+    # tasks if they weren't in tasks_covered or tasks_notcovered
+    def test_slow_setscene(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            sstatevalid = "a1:do_package"
+            slowtasks = "a1:package_setscene"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, slowtasks)
+            expected = ['a1:package_setscene', 'a1:fetch', 'a1:unpack', 'a1:patch', 'a1:prepare_recipe_sysroot', 'a1:configure',
+                        'a1:compile', 'a1:install', 'a1:packagedata', 'a1:package_qa', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot', 'a1:build']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_setscenewhitelist(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "a1"]
+            extraenv = {
+                "BB_SETSCENE_ENFORCE" : "1",
+                "BB_SETSCENE_ENFORCE_WHITELIST" : "a1:do_package_write_rpm a1:do_build"
+            }
+            sstatevalid = "a1:do_package a1:do_package_qa a1:do_packagedata a1:do_package_write_ipk a1:do_populate_lic a1:do_populate_sysroot"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv)
+            expected = ['a1:packagedata_setscene', 'a1:package_qa_setscene', 'a1:package_write_ipk_setscene',
+                        'a1:populate_sysroot_setscene', 'a1:package_setscene']
+            self.assertEqual(set(tasks), set(expected))
+
+    # Tests for problems with dependencies between setscene tasks
+    def test_no_setscenevalid_harddeps(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "d1"]
+            sstatevalid = ""
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package', 'a1:fetch', 'a1:unpack', 'a1:patch', 'a1:prepare_recipe_sysroot', 'a1:configure',
+                        'a1:compile', 'a1:install', 'a1:packagedata', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot', 'd1:package', 'd1:fetch', 'd1:unpack', 'd1:patch', 'd1:prepare_recipe_sysroot', 'd1:configure',
+                        'd1:compile', 'd1:install', 'd1:packagedata', 'd1:package_qa', 'd1:package_write_rpm', 'd1:package_write_ipk',
+                        'd1:populate_sysroot', 'd1:build']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_no_setscenevalid_withdeps(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "b1"]
+            sstatevalid = ""
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:' + x for x in self.alltasks] + ['b1:' + x for x in self.alltasks]
+            expected.remove('a1:build')
+            expected.remove('a1:package_qa')
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_single_a1_setscenevalid_withdeps(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "b1"]
+            sstatevalid = "a1:do_package"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_setscene', 'a1:fetch', 'a1:unpack', 'a1:patch', 'a1:prepare_recipe_sysroot', 'a1:configure',
+                        'a1:compile', 'a1:install', 'a1:packagedata', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot'] + ['b1:' + x for x in self.alltasks]
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_single_b1_setscenevalid_withdeps(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "b1"]
+            sstatevalid = "b1:do_package"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package', 'a1:fetch', 'a1:unpack', 'a1:patch', 'a1:prepare_recipe_sysroot', 'a1:configure',
+                        'a1:compile', 'a1:install', 'a1:packagedata', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot', 'b1:package_setscene'] + ['b1:' + x for x in self.alltasks]
+            expected.remove('b1:package')
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_intermediate_setscenevalid_withdeps(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "b1"]
+            sstatevalid = "a1:do_package a1:do_populate_sysroot b1:do_package"
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_setscene', 'a1:packagedata', 'a1:package_write_rpm', 'a1:package_write_ipk',
+                        'a1:populate_sysroot_setscene', 'b1:package_setscene'] + ['b1:' + x for x in self.alltasks]
+            expected.remove('b1:package')
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_all_setscenevalid_withdeps(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            cmd = ["bitbake", "b1"]
+            sstatevalid = self.a1_sstatevalid + " " + self.b1_sstatevalid
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+            expected = ['a1:package_write_ipk_setscene', 'a1:package_write_rpm_setscene', 'a1:packagedata_setscene',
+                        'b1:build', 'a1:populate_sysroot_setscene', 'b1:package_write_ipk_setscene', 'b1:package_write_rpm_setscene',
+                        'b1:packagedata_setscene', 'b1:package_qa_setscene', 'b1:populate_sysroot_setscene']
+            self.assertEqual(set(tasks), set(expected))
+
+    def test_multiconfig_setscene_optimise(self):
+        with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+            extraenv = {
+                "BBMULTICONFIG" : "mc1 mc2",
+                "BB_SIGNATURE_HANDLER" : "basic"
+            }
+            cmd = ["bitbake", "b1", "mc:mc1:b1", "mc:mc2:b1"]
+            setscenetasks = ['package_write_ipk_setscene', 'package_write_rpm_setscene', 'packagedata_setscene',
+                             'populate_sysroot_setscene', 'package_qa_setscene']
+            sstatevalid = ""
+            tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv)
+            expected = ['a1:' + x for x in self.alltasks] + ['b1:' + x for x in self.alltasks] + \
+                       ['mc1:b1:' + x for x in setscenetasks] + ['mc1:a1:' + x for x in setscenetasks] + \
+                       ['mc2:b1:' + x for x in setscenetasks] + ['mc2:a1:' + x for x in setscenetasks] + \
+                       ['mc1:b1:build', 'mc2:b1:build']
+            for x in ['mc1:a1:package_qa_setscene', 'mc2:a1:package_qa_setscene', 'a1:build', 'a1:package_qa']:
+                expected.remove(x)
+            self.assertEqual(set(tasks), set(expected))
+
diff --git a/poky/bitbake/lib/bb/ui/knotty.py b/poky/bitbake/lib/bb/ui/knotty.py
index 88f638f..1c72aa2 100644
--- a/poky/bitbake/lib/bb/ui/knotty.py
+++ b/poky/bitbake/lib/bb/ui/knotty.py
@@ -660,7 +660,6 @@
             # ignore
             if isinstance(event, (bb.event.BuildBase,
                                   bb.event.MetadataEvent,
-                                  bb.event.StampUpdate,
                                   bb.event.ConfigParsed,
                                   bb.event.MultiConfigParsed,
                                   bb.event.RecipeParsed,
diff --git a/poky/bitbake/lib/bb/ui/uihelper.py b/poky/bitbake/lib/bb/ui/uihelper.py
index db7f0ca..c8dd7df 100644
--- a/poky/bitbake/lib/bb/ui/uihelper.py
+++ b/poky/bitbake/lib/bb/ui/uihelper.py
@@ -40,7 +40,7 @@
             self.running_pids.remove(event.pid)
             self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
             self.needUpdate = True
-        elif isinstance(event, bb.runqueue.runQueueTaskStarted) or isinstance(event, bb.runqueue.sceneQueueTaskStarted):
+        elif isinstance(event, bb.runqueue.runQueueTaskStarted):
             self.tasknumber_current = event.stats.completed + event.stats.active + event.stats.failed + 1
             self.tasknumber_total = event.stats.total
             self.needUpdate = True
diff --git a/poky/bitbake/lib/pyinotify.py b/poky/bitbake/lib/pyinotify.py
index 9dcfd0d..1528a22 100644
--- a/poky/bitbake/lib/pyinotify.py
+++ b/poky/bitbake/lib/pyinotify.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#
 # pyinotify.py - python interface to inotify
 # Copyright (c) 2005-2015 Sebastien Martini <seb@dbzteam.org>
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
index 6d9bb80..02d4f4b 100644
--- a/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
+++ b/poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
index 8417aa3..6c94684 100644
--- a/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/poky/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py b/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
index f402161..fba627b 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py b/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
index f86d19d..afd2d35 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
index 53c125e..d972aff 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
index c560d7d..e2623e8 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py
index e4f3d68..c542d45 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_recipes.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py
index bdb0c27..22acb47 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page_tasks.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py b/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
index 63f3f4a..e8b4295 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py b/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
index 0a00fcc..0790198 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
index e34aa13..f81e696 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py b/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
index d52b184..15d25dc 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_most_recent_builds_states.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py b/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
index 3b47a49..0aa3b7a 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py b/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py
index d250bd1..8e56bb0 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_new_project_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py b/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
index 065f3eb..47fb10b 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py b/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py
index 48508df..2816eb9 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_project_config_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_project_page.py b/poky/bitbake/lib/toaster/tests/browser/test_project_page.py
index 5cb607d..8b5e1b6 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_project_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_project_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_sample.py b/poky/bitbake/lib/toaster/tests/browser/test_sample.py
index 008ba14..f4ad670 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_sample.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_sample.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_task_page.py b/poky/bitbake/lib/toaster/tests/browser/test_task_page.py
index 47c8c1a..26f3dca 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_task_page.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_task_page.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py b/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py
index b4f8344..ef78cbb 100644
--- a/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py
+++ b/poky/bitbake/lib/toaster/tests/browser/test_toastertable_ui.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/builds/buildtest.py b/poky/bitbake/lib/toaster/tests/builds/buildtest.py
index 9f40f97..872bbd3 100644
--- a/poky/bitbake/lib/toaster/tests/builds/buildtest.py
+++ b/poky/bitbake/lib/toaster/tests/builds/buildtest.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py
index 3d3aa2a..44b6cbe 100644
--- a/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py
+++ b/poky/bitbake/lib/toaster/tests/builds/test_core_image_min.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py b/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py
index b633d97..9e8d555 100644
--- a/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py
+++ b/poky/bitbake/lib/toaster/tests/commands/test_loaddata.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py b/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py
index 23a84a2..3c4fbe0 100644
--- a/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py
+++ b/poky/bitbake/lib/toaster/tests/commands/test_lsupdates.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py b/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py
index 29bc7c9..e223b95 100644
--- a/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py
+++ b/poky/bitbake/lib/toaster/tests/commands/test_runbuilds.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py b/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py
index 3606cba..8ed6792 100644
--- a/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py
+++ b/poky/bitbake/lib/toaster/tests/eventreplay/__init__.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py b/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py
index 6a3f74b..455c408 100644
--- a/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py
+++ b/poky/bitbake/lib/toaster/tests/functional/functional_helpers.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster functional tests implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py b/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py
index 2b3a288..56c84fb 100644
--- a/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py
+++ b/poky/bitbake/lib/toaster/tests/functional/test_functional_basic.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster functional tests implementation
 #
diff --git a/poky/bitbake/lib/toaster/tests/views/test_views.py b/poky/bitbake/lib/toaster/tests/views/test_views.py
index 477654e..68d9e9d 100644
--- a/poky/bitbake/lib/toaster/tests/views/test_views.py
+++ b/poky/bitbake/lib/toaster/tests/views/test_views.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py b/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
index c1758f3..811fd5d 100644
--- a/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
+++ b/poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # BitBake Toaster Implementation
 #
diff --git a/poky/documentation/dev-manual/dev-manual-common-tasks.xml b/poky/documentation/dev-manual/dev-manual-common-tasks.xml
index 9231d14..165c3aa 100644
--- a/poky/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/poky/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -7129,7 +7129,8 @@
             This problem is solved with the OpenEmbedded build system by
             running the code through QEMU, which allows precisely that.
             Unfortunately, QEMU does not always work perfectly as mentioned
-            in the xxx section.
+            in the
+            "<link linkend='known-issues'>Known Issues</link>" section.
         </para>
 
         <section id='enabling-the-generation-of-introspection-data'>
diff --git a/poky/documentation/overview-manual/overview-manual.xml b/poky/documentation/overview-manual/overview-manual.xml
index e74ba8d..728cad5 100644
--- a/poky/documentation/overview-manual/overview-manual.xml
+++ b/poky/documentation/overview-manual/overview-manual.xml
@@ -37,6 +37,11 @@
                 <revremark>The initial document released with the Yocto Project 2.5 Release.</revremark>
             </revision>
             <revision>
+                <revnumber>2.6</revnumber>
+                <date>November 2018</date>
+                <revremark>Released with the Yocto Project 2.7 Release.</revremark>
+            </revision>
+            <revision>
                 <revnumber>2.7</revnumber>
                 <date>May 2019</date>
                 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
diff --git a/poky/documentation/ref-manual/ref-variables.xml b/poky/documentation/ref-manual/ref-variables.xml
index 12876e3..0080364 100644
--- a/poky/documentation/ref-manual/ref-variables.xml
+++ b/poky/documentation/ref-manual/ref-variables.xml
@@ -1358,7 +1358,7 @@
                     For example, the following line specifies three
                     configuration files:
                     <literallayout class='monospaced'>
-     BBMULTIFONFIG = "configA configB configC"
+     BBMULTICONFIG = "configA configB configC"
                     </literallayout>
                     Each configuration file you use must reside in the
                     <link linkend='build-directory'>Build Directory</link>
@@ -11694,8 +11694,7 @@
                     or
                     <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
                     classes, specifies the major Python version being built.
-                    For Python 2.x, <filename>PYTHON_PN</filename> would
-                    be "python2".  For Python 3.x, the variable would be
+                    For Python 3.x, <filename>PYTHON_PN</filename> would be
                     "python3".
                     You do not have to set this variable as the
                     OpenEmbedded build system automatically sets it for you.
diff --git a/poky/documentation/sdk-manual/sdk-extensible.xml b/poky/documentation/sdk-manual/sdk-extensible.xml
index bd52784..94d2a24 100644
--- a/poky/documentation/sdk-manual/sdk-extensible.xml
+++ b/poky/documentation/sdk-manual/sdk-extensible.xml
@@ -618,7 +618,23 @@
                                 The result is that the command sets up both
                                 the source code and an append file within the
                                 workspace while the recipe remains in its
-                                original location.
+                                original location.</para>
+
+                                <para>Additionally, if you have any non-patch
+                                local files (i.e. files referred to with
+                                <filename>file://</filename> entries in
+                                <filename>SRC_URI</filename> statement excluding
+                                <filename>*.patch/</filename> or
+                                <filename>*.diff</filename>), these files are
+                                copied to an
+                                <filename>oe-local-files</filename> folder
+                                under the newly created source tree.
+                                Copying the files here gives you a convenient
+                                area from which you can modify the files.
+                                Any changes or additions you make to those
+                                files are incorporated into the build the next
+                                time you build the software just as are other
+                                changes you might have made to the source.
                                 </para></listitem>
                             <listitem><para>
                                 <emphasis>Middle</emphasis>:
@@ -633,10 +649,10 @@
                                 </para>
 
                                 <para>The following command tells
-                                <filename>devtool</filename> what recipe with
+                                <filename>devtool</filename> the recipe with
                                 which to work and, in this case, identifies a
                                 local area for the extracted source files that
-                                is outside of the default
+                                exists outside of the default
                                 <filename>devtool</filename> workspace:
                                 <literallayout class='monospaced'>
      $ devtool modify <replaceable>recipe srctree</replaceable>
@@ -650,8 +666,12 @@
                                 the recipe's <filename>SRC_URI</filename>
                                 statements to locate the source files and any
                                 associated patch files.
-                                Once the files are located, the command by
-                                default extracts them into
+                                Non-patch files are copied to an
+                                <filename>oe-local-files</filename> folder
+                                under the newly created source tree.</para>
+
+                                <para>Once the files are located, the command
+                                by default extracts them into
                                 <replaceable>srctree</replaceable>.</para>
 
                                 <para>Within workspace,
@@ -685,9 +705,21 @@
                                 </literallayout>
                                 </para>
 
-                                <para>Once the command finishes, it creates only
-                                an append file for the recipe in the
-                                <filename>devtool</filename> workspace.
+                                <para>If an <filename>oe-local-files</filename>
+                                subdirectory happens to exist and it contains
+                                non-patch files, the files are used.
+                                However, if the subdirectory does not exist and
+                                you run the <filename>devtool finish</filename>
+                                command, any non-patch files that might exist
+                                next to the recipe are removed because it
+                                appears to <filename>devtool</filename> that
+                                you have deleted those files.</para>
+
+                                <para>Once the
+                                <filename>devtool modify</filename> command
+                                finishes, it creates only an append file for
+                                the recipe in the <filename>devtool</filename>
+                                workspace.
                                 The recipe and the source code remain in their
                                 original locations.
                                 </para></listitem>
@@ -778,7 +810,12 @@
                         original recipe in the original layer or the command
                         creates a <filename>.bbappend</filename> file in a
                         different layer as provided by
-                        <replaceable>layer</replaceable>.</para>
+                        <replaceable>layer</replaceable>.
+                        Any work you did in the
+                        <filename>oe-local-files</filename> directory is
+                        preserved in the original files next to the recipe
+                        during the <filename>devtool finish</filename>
+                        command.</para>
 
                         <para>As a final process of the
                         <filename>devtool finish</filename> command, the state
@@ -898,7 +935,23 @@
                         files from other developers.
                         The result is that the command sets up the source
                         code, the new version of the recipe, and an append file
-                        all within the workspace.
+                        all within the workspace.</para>
+
+                        <para>Additionally, if you have any non-patch
+                        local files (i.e. files referred to with
+                        <filename>file://</filename> entries in
+                        <filename>SRC_URI</filename> statement excluding
+                        <filename>*.patch/</filename> or
+                        <filename>*.diff</filename>), these files are
+                        copied to an
+                        <filename>oe-local-files</filename> folder
+                        under the newly created source tree.
+                        Copying the files here gives you a convenient
+                        area from which you can modify the files.
+                        Any changes or additions you make to those
+                        files are incorporated into the build the next
+                        time you build the software just as are other
+                        changes you might have made to the source.
                         </para></listitem>
                     <listitem><para>
                         <emphasis>Resolve any Conflicts created by the Upgrade</emphasis>:
@@ -976,10 +1029,18 @@
                         Git repository, moves the new recipe to a more
                         permanent layer, and then resets the recipe so that
                         the recipe is built normally rather than from the
-                        workspace.
+                        workspace.</para>
+
+                        <para>Any work you did in the
+                        <filename>oe-local-files</filename> directory is
+                        preserved in the original files next to the recipe
+                        during the <filename>devtool finish</filename>
+                        command.</para>
+
+                        <para>
                         If you specify a destination layer that is the same as
                         the original source, then the old version of the
-                        recipe and associated files will be removed prior to
+                        recipe and associated files are removed prior to
                         adding the new version.
                         <literallayout class='monospaced'>
      $ devtool finish <replaceable>recipe layer</replaceable>
diff --git a/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc b/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc
new file mode 100644
index 0000000..081584f
--- /dev/null
+++ b/poky/meta-poky/conf/distro/include/poky-distro-alt-test-config.inc
@@ -0,0 +1,2 @@
+DISTRO_FEATURES_append = " pam"
+PREFERRED_VERSION_linux-yocto_linuxstdbase ?= "4.19%"
diff --git a/poky/meta-poky/conf/distro/poky-lsb.conf b/poky/meta-poky/conf/distro/poky-lsb.conf
index 5c7e272..9b36c87 100644
--- a/poky/meta-poky/conf/distro/poky-lsb.conf
+++ b/poky/meta-poky/conf/distro/poky-lsb.conf
@@ -4,8 +4,7 @@
 DISTRO = "poky-lsb"
 DISTROOVERRIDES = "poky:linuxstdbase"
 
-DISTRO_FEATURES_append = " pam largefile opengl"
-PREFERRED_PROVIDER_virtual/libx11 = "libx11"
+DISTRO_FEATURES_append = " pam"
 
 # Ensure the kernel nfs server is enabled
 KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
diff --git a/poky/meta-poky/conf/distro/poky.conf b/poky/meta-poky/conf/distro/poky.conf
index 78621e6..ac6368d 100644
--- a/poky/meta-poky/conf/distro/poky.conf
+++ b/poky/meta-poky/conf/distro/poky.conf
@@ -56,10 +56,13 @@
             ubuntu-18.04 \n \
             fedora-28 \n \
             fedora-29 \n \
+            fedora-30 \n \
             centos-7 \n \
             debian-8 \n \
             debian-9 \n \
+            debian-10 \n \
             opensuse-42.3 \n \
+            opensuseleap-15.1 \n \
             "
 #
 # OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
diff --git a/poky/meta-selftest/recipes-test/fortran/files/hello.f95 b/poky/meta-selftest/recipes-test/fortran/files/hello.f95
new file mode 100644
index 0000000..a0745fc
--- /dev/null
+++ b/poky/meta-selftest/recipes-test/fortran/files/hello.f95
@@ -0,0 +1,5 @@
+program helloworld
+
+      print * , "Hello World!"
+
+end program helloworld
diff --git a/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
new file mode 100644
index 0000000..97313d7
--- /dev/null
+++ b/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Fortran Hello World"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "libgfortran"
+
+SRC_URI = "file://hello.f95"
+
+# These set flags that Fortran doesn't support
+SECURITY_CFLAGS = ""
+SECURITY_LDFLAGS = ""
+
+do_compile() {
+	${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install ${B}/fortran-hello ${D}${bindir}
+}
+
+python () {
+    if not d.getVar("FORTRAN"):
+        raise bb.parse.SkipRecipe("Fortran isn't enabled")
+}
\ No newline at end of file
diff --git a/poky/meta-selftest/wic/test_biosplusefi_plugin.wks b/poky/meta-selftest/wic/test_biosplusefi_plugin.wks
new file mode 100644
index 0000000..5a56c84
--- /dev/null
+++ b/poky/meta-selftest/wic/test_biosplusefi_plugin.wks
@@ -0,0 +1,6 @@
+# short-description: This file is used in oe-selftest wic module to test biosplusefi plugin
+
+part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi" --active --align 1024 --use-uuid
+part / --source rootfs --fstype=ext4 --align 1024 --use-uuid
+
+bootloader  --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
index 35814cd..7c7b305 100644
--- a/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
+++ b/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
@@ -20,7 +20,7 @@
 IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
 do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot u-boot:do_deploy"
 
-SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0"
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
@@ -39,3 +39,21 @@
 MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
 
 IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
+
+# support runqemu
+EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
+IMAGE_CLASSES += "qemuboot"
+QB_DEFAULT_FSTYPE = "wic"
+QB_FSINFO = "wic:no-kernel-in-fs"
+QB_KERNEL_ROOT = "/dev/vda2"
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MEM = "-m 512"
+QB_MACHINE = "-machine virt"
+QB_CPU = "-cpu cortex-a15"
+QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0 systemd.mask=systemd-networkd"
+QB_OPT_APPEND = "-device virtio-rng-device"
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
+QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
+QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
+QB_SERIAL_OPT = ""
+QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
diff --git a/poky/meta/classes/bluetooth.bbclass b/poky/meta/classes/bluetooth.bbclass
deleted file mode 100644
index f88b4ae..0000000
--- a/poky/meta/classes/bluetooth.bbclass
+++ /dev/null
@@ -1,14 +0,0 @@
-# Avoid code duplication in bluetooth-dependent recipes.
-
-# Define a variable that expands to the recipe (package) providing core
-# bluetooth support on the platform:
-# "" if bluetooth is not in DISTRO_FEATURES
-# else "bluez5" if bluez5 is in DISTRO_FEATURES
-# else "bluez4"
-
-# Use this with:
-#  inherit bluetooth
-#  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}
-#  PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4"
-
-BLUEZ ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5', 'bluez4', d), '', d)}"
diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass
index 2e501df..f986f7c 100644
--- a/poky/meta/classes/buildhistory.bbclass
+++ b/poky/meta/classes/buildhistory.bbclass
@@ -60,15 +60,34 @@
 # When extending build history, derive your class from buildhistory.bbclass
 # and extend this list here with the additional files created by the derived
 # class.
-BUILDHISTORY_PRESERVE = "latest latest_srcrev"
+BUILDHISTORY_PRESERVE = "latest latest_srcrev sysroot"
 
 PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"
 PATCH_GIT_USER_NAME ?= "OpenEmbedded"
 
 #
+# Write out the contents of the sysroot
+#
+buildhistory_emit_sysroot() {
+	mkdir --parents ${BUILDHISTORY_DIR_PACKAGE}
+	case ${CLASSOVERRIDE} in
+	class-native|class-cross|class-crosssdk)
+		BASE=${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}
+		;;
+	*)
+		BASE=${SYSROOT_DESTDIR}
+		;;
+	esac
+	buildhistory_list_files_no_owners $BASE ${BUILDHISTORY_DIR_PACKAGE}/sysroot
+}
+
+#
 # Write out metadata about this package for comparison when writing future packages
 #
 python buildhistory_emit_pkghistory() {
+    if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']:
+        bb.build.exec_func("buildhistory_emit_sysroot", d)
+
     if not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']:
         return 0
 
@@ -529,6 +548,20 @@
 	fi | sort -k5 | sed 's/ * -> $//' > $2 )
 }
 
+buildhistory_list_files_no_owners() {
+	# List the files in the specified directory, but exclude date/time etc.
+	# Also don't output the ownership data, but instead output just - - so
+	# that the same parsing code as for _list_files works.
+	# This is somewhat messy, but handles where the size is not printed for device files under pseudo
+	( cd $1
+	find_cmd='find . ! -path . -printf "%M -          -          %10s %p -> %l\n"'
+	if [ "$3" = "fakeroot" ] ; then
+		eval ${FAKEROOTENV} ${FAKEROOTCMD} "$find_cmd"
+	else
+		eval "$find_cmd"
+	fi | sort -k5 | sed 's/ * -> $//' > $2 )
+}
+
 buildhistory_list_pkg_files() {
 	# Create individual files-in-package for each recipe's package
 	for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do
diff --git a/poky/meta/classes/cve-check.bbclass b/poky/meta/classes/cve-check.bbclass
index 379f712..c00d291 100644
--- a/poky/meta/classes/cve-check.bbclass
+++ b/poky/meta/classes/cve-check.bbclass
@@ -26,7 +26,7 @@
 CVE_VERSION ??= "${PV}"
 
 CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
-CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd-json.db"
+CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_1.0.db"
 
 CVE_CHECK_LOG ?= "${T}/cve.log"
 CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check"
@@ -37,32 +37,33 @@
 CVE_CHECK_CREATE_MANIFEST ??= "1"
 
 # Whitelist for packages (PN)
-CVE_CHECK_PN_WHITELIST = "\
-    glibc-locale \
-"
+CVE_CHECK_PN_WHITELIST ?= ""
 
-# Whitelist for CVE and version of package
-CVE_CHECK_CVE_WHITELIST = "{\
-    'CVE-2014-2524': ('6.3','5.2',), \
-}"
+# Whitelist for CVE. If a CVE is found, then it is considered patched.
+# The value is a string containing space separated CVE values:
+# 
+# CVE_CHECK_WHITELIST = 'CVE-2014-2524 CVE-2018-1234'
+# 
+CVE_CHECK_WHITELIST ?= ""
 
 python do_cve_check () {
     """
     Check recipe for patched and unpatched CVEs
     """
 
-    if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE")):
+    if os.path.exists(d.getVar("CVE_CHECK_DB_FILE")):
         patched_cves = get_patches_cves(d)
         patched, unpatched = check_cves(d, patched_cves)
         if patched or unpatched:
             cve_data = get_cve_info(d, patched + unpatched)
             cve_write_data(d, patched, unpatched, cve_data)
     else:
-        bb.note("Failed to update CVE database, skipping CVE check")
+        bb.note("No CVE database found, skipping CVE check")
+
 }
 
 addtask cve_check after do_unpack before do_build
-do_cve_check[depends] = "cve-update-db:do_populate_cve_db"
+do_cve_check[depends] = "cve-update-db-native:do_populate_cve_db"
 do_cve_check[nostamp] = "1"
 
 python cve_check_cleanup () {
@@ -170,52 +171,87 @@
 
     cves_unpatched = []
     # CVE_PRODUCT can contain more than one product (eg. curl/libcurl)
-    bpn = d.getVar("CVE_PRODUCT").split()
+    products = d.getVar("CVE_PRODUCT").split()
     # If this has been unset then we're not scanning for CVEs here (for example, image recipes)
-    if len(bpn) == 0:
+    if not products:
         return ([], [])
     pv = d.getVar("CVE_VERSION").split("+git")[0]
-    cve_whitelist = ast.literal_eval(d.getVar("CVE_CHECK_CVE_WHITELIST"))
 
     # If the recipe has been whitlisted we return empty lists
     if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split():
         bb.note("Recipe has been whitelisted, skipping check")
         return ([], [])
 
+    old_cve_whitelist =  d.getVar("CVE_CHECK_CVE_WHITELIST")
+    if old_cve_whitelist:
+        bb.warn("CVE_CHECK_CVE_WHITELIST is deprecated, please use CVE_CHECK_WHITELIST.")
+    cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split()
+
     import sqlite3
     db_file = d.getVar("CVE_CHECK_DB_FILE")
     conn = sqlite3.connect(db_file)
-    c = conn.cursor()
 
-    query = """SELECT * FROM PRODUCTS WHERE
-               (PRODUCT IS '{0}' AND VERSION = '{1}' AND OPERATOR IS '=') OR
-               (PRODUCT IS '{0}' AND OPERATOR IS '<=');"""
-    for idx in range(len(bpn)):
-        for row in c.execute(query.format(bpn[idx],pv)):
-            cve = row[1]
-            version = row[4]
+    for product in products:
+        c = conn.cursor()
+        if ":" in product:
+            vendor, product = product.split(":", 1)
+            c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR IS ?", (product, vendor))
+        else:
+            c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ?", (product,))
 
-            try:
-                discardVersion = LooseVersion(version) < LooseVersion(pv)
-            except:
-                discardVersion = True
+        for row in c:
+            cve = row[0]
+            version_start = row[3]
+            operator_start = row[4]
+            version_end = row[5]
+            operator_end = row[6]
 
-            if pv in cve_whitelist.get(cve,[]):
-                bb.note("%s-%s has been whitelisted for %s" % (bpn[idx], pv, cve))
+            if cve in cve_whitelist:
+                bb.note("%s-%s has been whitelisted for %s" % (product, pv, cve))
             elif cve in patched_cves:
                 bb.note("%s has been patched" % (cve))
-            elif discardVersion:
-                bb.debug(2, "Do not consider version %s " % (version))
             else:
-                cves_unpatched.append(cve)
-                bb.debug(2, "%s-%s is not patched for %s" % (bpn[idx], pv, cve))
+                to_append = False
+                if (operator_start == '=' and pv == version_start):
+                    cves_unpatched.append(cve)
+                else:
+                    if operator_start:
+                        try:
+                            to_append_start =  (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start))
+                            to_append_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start))
+                        except:
+                            bb.note("%s: Failed to compare %s %s %s for %s" %
+                                    (product, pv, operator_start, version_start, cve))
+                            to_append_start = False
+                    else:
+                        to_append_start = False
+
+                    if operator_end:
+                        try:
+                            to_append_end  = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end))
+                            to_append_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end))
+                        except:
+                            bb.note("%s: Failed to compare %s %s %s for %s" %
+                                    (product, pv, operator_end, version_end, cve))
+                            to_append_end = False
+                    else:
+                        to_append_end = False
+
+                    if operator_start and operator_end:
+                        to_append = to_append_start and to_append_end
+                    else:
+                        to_append = to_append_start or to_append_end
+
+                if to_append:
+                    cves_unpatched.append(cve)
+                bb.debug(2, "%s-%s is not patched for %s" % (product, pv, cve))
     conn.close()
 
     return (list(patched_cves), cves_unpatched)
 
 def get_cve_info(d, cves):
     """
-    Get CVE information from the database used by cve-check-tool.
+    Get CVE information from the database.
 
     Unfortunately the only way to get CVE info is set the output to
     html (hard to parse) or query directly the database.
diff --git a/poky/meta/classes/go-ptest.bbclass b/poky/meta/classes/go-ptest.bbclass
new file mode 100644
index 0000000..e230a80
--- /dev/null
+++ b/poky/meta/classes/go-ptest.bbclass
@@ -0,0 +1,54 @@
+inherit go ptest
+
+do_compile_ptest_base() {
+	export TMPDIR="${GOTMPDIR}"
+	rm -f ${B}/.go_compiled_tests.list
+	go_list_package_tests | while read pkg; do
+		cd ${B}/src/$pkg
+		${GO} test ${GOPTESTBUILDFLAGS} $pkg
+		find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
+			sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
+	done
+	do_compile_ptest
+}
+
+do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
+
+go_make_ptest_wrapper() {
+	cat >${D}${PTEST_PATH}/run-ptest <<EOF
+#!/bin/sh
+RC=0
+run_test() (
+    cd "\$1"
+    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
+    exit \$?)
+EOF
+
+}
+
+do_install_ptest_base() {
+	test -f "${B}/.go_compiled_tests.list" || exit 0
+	install -d ${D}${PTEST_PATH}
+	go_stage_testdata
+	go_make_ptest_wrapper
+	havetests=""
+	while read test; do
+		testdir=`dirname $test`
+		testprog=`basename $test`
+		install -d ${D}${PTEST_PATH}/$testdir
+		install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
+	echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
+		havetests="yes"
+	done < ${B}/.go_compiled_tests.list
+	if [ -n "$havetests" ]; then
+		echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
+		chmod +x ${D}${PTEST_PATH}/run-ptest
+	else
+		rm -rf ${D}${PTEST_PATH}
+	fi
+	do_install_ptest
+	chown -R root:root ${D}${PTEST_PATH}
+}
+
+INSANE_SKIP_${PN}-ptest += "ldflags"
+
diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass
index e05a5c6..f303a15 100644
--- a/poky/meta/classes/go.bbclass
+++ b/poky/meta/classes/go.bbclass
@@ -1,4 +1,4 @@
-inherit goarch ptest
+inherit goarch
 
 GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
 
@@ -114,19 +114,6 @@
 do_compile[dirs] =+ "${GOTMPDIR}"
 do_compile[cleandirs] = "${B}/bin ${B}/pkg"
 
-do_compile_ptest_base() {
-	export TMPDIR="${GOTMPDIR}"
-	rm -f ${B}/.go_compiled_tests.list
-	go_list_package_tests | while read pkg; do
-		cd ${B}/src/$pkg
-		${GO} test ${GOPTESTBUILDFLAGS} $pkg
-		find . -mindepth 1 -maxdepth 1 -type f -name '*.test' -exec echo $pkg/{} \; | \
-			sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list
-	done
-	do_compile_ptest
-}
-do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
-
 go_do_install() {
 	install -d ${D}${libdir}/go/src/${GO_IMPORT}
 	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' . | \
@@ -139,18 +126,6 @@
 	fi
 }
 
-go_make_ptest_wrapper() {
-	cat >${D}${PTEST_PATH}/run-ptest <<EOF
-#!/bin/sh
-RC=0
-run_test() (
-    cd "\$1"
-    ((((./\$2 ${GOPTESTFLAGS}; echo \$? >&3) | sed -r -e"s,^(PASS|SKIP|FAIL)\$,\\1: \$1/\$2," >&4) 3>&1) | (read rc; exit \$rc)) 4>&1
-    exit \$?)
-EOF
-
-}
-
 go_stage_testdata() {
 	oldwd="$PWD"
 	cd ${S}/src
@@ -165,37 +140,12 @@
 	cd "$oldwd"
 }
 
-do_install_ptest_base() {
-	test -f "${B}/.go_compiled_tests.list" || exit 0
-	install -d ${D}${PTEST_PATH}
-	go_stage_testdata
-	go_make_ptest_wrapper
-	havetests=""
-	while read test; do
-		testdir=`dirname $test`
-		testprog=`basename $test`
-		install -d ${D}${PTEST_PATH}/$testdir
-		install -m 0755 ${B}/src/$test ${D}${PTEST_PATH}/$test
-	echo "run_test $testdir $testprog || RC=1" >> ${D}${PTEST_PATH}/run-ptest
-		havetests="yes"
-	done < ${B}/.go_compiled_tests.list
-	if [ -n "$havetests" ]; then
-		echo "exit \$RC" >> ${D}${PTEST_PATH}/run-ptest
-		chmod +x ${D}${PTEST_PATH}/run-ptest
-	else
-		rm -rf ${D}${PTEST_PATH}
-	fi
-	do_install_ptest
-	chown -R root:root ${D}${PTEST_PATH}
-}
-
 EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
 
 FILES_${PN}-dev = "${libdir}/go/src"
 FILES_${PN}-staticdev = "${libdir}/go/pkg"
 
 INSANE_SKIP_${PN} += "ldflags"
-INSANE_SKIP_${PN}-ptest += "ldflags"
 
 # Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
 # doesn't support -buildmode=pie, so skip the QA checking for mips and its
diff --git a/poky/meta/classes/grub-efi.bbclass b/poky/meta/classes/grub-efi.bbclass
index 90badc0..ec692f1 100644
--- a/poky/meta/classes/grub-efi.bbclass
+++ b/poky/meta/classes/grub-efi.bbclass
@@ -9,9 +9,16 @@
 
 	GRUB_IMAGE="grub-efi-bootia32.efi"
 	DEST_IMAGE="bootia32.efi"
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
-		GRUB_IMAGE="grub-efi-bootx64.efi"
-		DEST_IMAGE="bootx64.efi"
+	if [ -n "${MLPREFIX}" ]; then
+		if [ "${TARGET_ARCH_MULTILIB_ORIGINAL}" = "x86_64" ]; then
+			GRUB_IMAGE="grub-efi-bootx64.efi"
+			DEST_IMAGE="bootx64.efi"
+		fi
+	else
+		if [ "${TARGET_ARCH}" = "x86_64" ]; then
+			GRUB_IMAGE="grub-efi-bootx64.efi"
+			DEST_IMAGE="bootx64.efi"
+		fi
 	fi
 	install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}/${DEST_IMAGE}
 	EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
diff --git a/poky/meta/classes/gtk-icon-cache.bbclass b/poky/meta/classes/gtk-icon-cache.bbclass
index 66fe781..91cb4ad 100644
--- a/poky/meta/classes/gtk-icon-cache.bbclass
+++ b/poky/meta/classes/gtk-icon-cache.bbclass
@@ -6,7 +6,7 @@
 
 gtk_icon_cache_postinst() {
 if [ "x$D" != "x" ]; then
-	$INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
+	$INTERCEPT_DIR/postinst_intercept update_gtk_icon_cache ${PKG} \
 		mlprefix=${MLPREFIX} \
 		libdir_native=${libdir_native}
 else
@@ -24,7 +24,7 @@
 
 gtk_icon_cache_postrm() {
 if [ "x$D" != "x" ]; then
-	$INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
+	$INTERCEPT_DIR/postinst_intercept update_gtk_icon_cache ${PKG} \
 		mlprefix=${MLPREFIX} \
 		libdir=${libdir}
 else
diff --git a/poky/meta/classes/icecc.bbclass b/poky/meta/classes/icecc.bbclass
index edb0e10..0955181 100644
--- a/poky/meta/classes/icecc.bbclass
+++ b/poky/meta/classes/icecc.bbclass
@@ -57,7 +57,7 @@
 # See: https://github.com/icecc/icecream/issues/190
 export ICECC_CARET_WORKAROUND ??= "0"
 
-export ICECC_REMOTE_CPP ??= "1"
+export ICECC_REMOTE_CPP ??= "0"
 
 ICECC_CFLAGS = ""
 CFLAGS += "${ICECC_CFLAGS}"
diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass
index d2b2fb9..682858d 100644
--- a/poky/meta/classes/image.bbclass
+++ b/poky/meta/classes/image.bbclass
@@ -328,7 +328,8 @@
 
 def setup_debugfs_variables(d):
     d.appendVar('IMAGE_ROOTFS', '-dbg')
-    d.appendVar('IMAGE_LINK_NAME', '-dbg')
+    if d.getVar('IMAGE_LINK_NAME'):
+        d.appendVar('IMAGE_LINK_NAME', '-dbg')
     d.appendVar('IMAGE_NAME','-dbg')
     d.setVar('IMAGE_BUILDING_DEBUGFS', 'true')
     debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS')
@@ -666,10 +667,11 @@
 }
 
 systemd_preset_all () {
-    systemctl --root="${IMAGE_ROOTFS}" --preset-mode=enable-only preset-all
+    if [ -e ${IMAGE_ROOTFS}${root_prefix}/lib/systemd/systemd ]; then
+	systemctl --root="${IMAGE_ROOTFS}" --preset-mode=enable-only preset-all
+    fi
 }
 
-IMAGE_EXTRADEPENDS += "${@ 'systemd-systemctl-native' if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and not bb.utils.contains('IMAGE_FEATURES', 'stateless-rootfs', True, False, d) else ''}"
 IMAGE_PREPROCESS_COMMAND_append = " ${@ 'systemd_preset_all;' if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and not bb.utils.contains('IMAGE_FEATURES', 'stateless-rootfs', True, False, d) else ''} reproducible_final_image_task; "
 
 CVE_PRODUCT = ""
diff --git a/poky/meta/classes/image_types_wic.bbclass b/poky/meta/classes/image_types_wic.bbclass
index 5b40a9e..97d681b 100644
--- a/poky/meta/classes/image_types_wic.bbclass
+++ b/poky/meta/classes/image_types_wic.bbclass
@@ -3,7 +3,10 @@
 WICVARS ?= "\
            BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \
            IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
-           ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"
+           ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \
+           KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME"
+
+inherit ${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', 'kernel-artifact-names', '', d)}
 
 WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
 WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass
index 0695a04..891d3a8 100644
--- a/poky/meta/classes/insane.bbclass
+++ b/poky/meta/classes/insane.bbclass
@@ -874,15 +874,14 @@
         if exc.errno != errno.ENOENT:
             raise
     else:
-        rootfs_path = path[len(dest):]
         check_uid = int(d.getVar('HOST_USER_UID'))
         if stat.st_uid == check_uid:
-            package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_uid))
+            package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by uid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_uid))
             return False
 
         check_gid = int(d.getVar('HOST_USER_GID'))
         if stat.st_gid == check_gid:
-            package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, rootfs_path, check_gid))
+            package_qa_add_message(messages, "host-user-contaminated", "%s: %s is owned by gid %d, which is the same as the user running bitbake. This may be due to host contamination" % (pn, package_qa_clean_path(path, d, name), check_gid))
             return False
     return True
 
diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass
index 0edbfc1..626b0e7 100644
--- a/poky/meta/classes/meson.bbclass
+++ b/poky/meta/classes/meson.bbclass
@@ -30,11 +30,6 @@
               -Dcpp_args='${BUILD_CPPFLAGS} ${BUILD_CXXFLAGS}' \
               -Dcpp_link_args='${BUILD_LDFLAGS}'"
 
-MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
-MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}"
-MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}"
-MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}"
-
 EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
 
 MESON_CROSS_FILE = ""
@@ -78,7 +73,7 @@
         bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
 
 addtask write_config before do_configure
-do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF"
+do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS"
 do_write_config() {
     # This needs to be Py to split the args into single-element lists
     cat >${WORKDIR}/meson.cross <<EOF
@@ -95,10 +90,10 @@
 
 [properties]
 needs_exe_wrapper = true
-c_args = ${@meson_array('MESON_C_ARGS', d)}
-c_link_args = ${@meson_array('MESON_LINK_ARGS', d)}
-cpp_args = ${@meson_array('MESON_CPP_ARGS', d)}
-cpp_link_args = ${@meson_array('MESON_LINK_ARGS', d)}
+c_args = ${@meson_array('CFLAGS', d)}
+c_link_args = ${@meson_array('LDFLAGS', d)}
+cpp_args = ${@meson_array('CXXFLAGS', d)}
+cpp_link_args = ${@meson_array('LDFLAGS', d)}
 gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
 
 [host_machine]
@@ -135,6 +130,7 @@
     export CXX="${BUILD_CXX}"
     export LD="${BUILD_LD}"
     export AR="${BUILD_AR}"
+    export STRIP="${BUILD_STRIP}"
     # These contain *target* flags but will be used as *native* flags.  The
     # correct native flags will be passed via -Dc_args and so on, unset them so
     # they don't interfere with tools invoked by Meson (such as g-ir-scanner)
diff --git a/poky/meta/classes/multilib.bbclass b/poky/meta/classes/multilib.bbclass
index 7750221..d625bd5 100644
--- a/poky/meta/classes/multilib.bbclass
+++ b/poky/meta/classes/multilib.bbclass
@@ -125,8 +125,55 @@
     clsextend.map_variable("USERADD_PACKAGES")
     clsextend.map_variable("SYSTEMD_PACKAGES")
     clsextend.map_variable("UPDATERCPN")
+
+    reset_alternative_priority(d)
 }
 
+def reset_alternative_priority(d):
+    if not bb.data.inherits_class('update-alternatives', d):
+        return
+
+    # There might be multiple multilibs at the same time, e.g., lib32 and
+    # lib64, each of them should have a different priority.
+    multilib_variants = d.getVar('MULTILIB_VARIANTS')
+    bbextendvariant = d.getVar('BBEXTENDVARIANT')
+    reset_gap = multilib_variants.split().index(bbextendvariant) + 1
+
+    # ALTERNATIVE_PRIORITY = priority
+    alt_priority_recipe = d.getVar('ALTERNATIVE_PRIORITY')
+    # Reset ALTERNATIVE_PRIORITY when found
+    if alt_priority_recipe:
+        reset_priority = int(alt_priority_recipe) - reset_gap
+        bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY to %s' % (d.getVar('PN'), reset_priority))
+        d.setVar('ALTERNATIVE_PRIORITY', reset_priority)
+
+    handled_pkgs = []
+    for pkg in (d.getVar('PACKAGES') or "").split():
+        # ALTERNATIVE_PRIORITY_pkg = priority
+        alt_priority_pkg = d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg)
+        # Reset ALTERNATIVE_PRIORITY_pkg when found
+        if alt_priority_pkg:
+            reset_priority = int(alt_priority_pkg) - reset_gap
+            if not pkg in handled_pkgs:
+                handled_pkgs.append(pkg)
+                bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY_%s to %s' % (pkg, pkg, reset_priority))
+                d.setVar('ALTERNATIVE_PRIORITY_%s' % pkg, reset_priority)
+
+        for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
+            # ALTERNATIVE_PRIORITY_pkg[tool]  = priority
+            alt_priority_pkg_name = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name)
+            # ALTERNATIVE_PRIORITY[tool] = priority
+            alt_priority_name = d.getVarFlag('ALTERNATIVE_PRIORITY', alt_name)
+
+            if alt_priority_pkg_name:
+                reset_priority = int(alt_priority_pkg_name) - reset_gap
+                bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY_%s[%s] to %s' % (pkg, pkg, alt_name, reset_priority))
+                d.setVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name, reset_priority)
+            elif alt_priority_name:
+                reset_priority = int(alt_priority_name) - reset_gap
+                bb.debug(1, '%s: Setting ALTERNATIVE_PRIORITY[%s] to %s' % (pkg, alt_name, reset_priority))
+                d.setVarFlag('ALTERNATIVE_PRIORITY', alt_name, reset_priority)
+
 PACKAGEFUNCS_append = " do_package_qa_multilib"
 
 python do_package_qa_multilib() {
diff --git a/poky/meta/classes/multilib_global.bbclass b/poky/meta/classes/multilib_global.bbclass
index 19ce1a5..98f65c8 100644
--- a/poky/meta/classes/multilib_global.bbclass
+++ b/poky/meta/classes/multilib_global.bbclass
@@ -172,21 +172,27 @@
     if bb.data.inherits_class('kernel', e.data) or \
             bb.data.inherits_class('module-base', e.data) or \
             d.getVar('BPN') in non_ml_recipes:
+
+            # We need to avoid expanding KERNEL_VERSION which we can do by deleting it
+            # from a copy of the datastore
+            localdata = bb.data.createCopy(d)
+            localdata.delVar("KERNEL_VERSION")
+
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
             clsextends = []
             for variant in variants:
-                clsextends.append(oe.classextend.ClassExtender(variant, e.data))
+                clsextends.append(oe.classextend.ClassExtender(variant, localdata))
 
             # Process PROVIDES
-            origprovs = provs = e.data.getVar("PROVIDES") or ""
+            origprovs = provs = localdata.getVar("PROVIDES") or ""
             for clsextend in clsextends:
                 provs = provs + " " + clsextend.map_variable("PROVIDES", setvar=False)
             e.data.setVar("PROVIDES", provs)
 
             # Process RPROVIDES
-            origrprovs = rprovs = e.data.getVar("RPROVIDES") or ""
+            origrprovs = rprovs = localdata.getVar("RPROVIDES") or ""
             for clsextend in clsextends:
                 rprovs = rprovs + " " + clsextend.map_variable("RPROVIDES", setvar=False)
             if rprovs.strip():
@@ -194,7 +200,7 @@
 
             # Process RPROVIDES_${PN}...
             for pkg in (e.data.getVar("PACKAGES") or "").split():
-                origrprovs = rprovs = e.data.getVar("RPROVIDES_%s" % pkg) or ""
+                origrprovs = rprovs = localdata.getVar("RPROVIDES_%s" % pkg) or ""
                 for clsextend in clsextends:
                     rprovs = rprovs + " " + clsextend.map_variable("RPROVIDES_%s" % pkg, setvar=False)
                     rprovs = rprovs + " " + clsextend.extname + "-" + pkg
@@ -202,5 +208,4 @@
 }
 
 addhandler multilib_virtclass_handler_global
-multilib_virtclass_handler_global[eventmask] = "bb.event.RecipeParsed"
-
+multilib_virtclass_handler_global[eventmask] = "bb.event.RecipeTaskPreProcess"
diff --git a/poky/meta/classes/multilib_script.bbclass b/poky/meta/classes/multilib_script.bbclass
index dc166d0..b11efc1 100644
--- a/poky/meta/classes/multilib_script.bbclass
+++ b/poky/meta/classes/multilib_script.bbclass
@@ -17,18 +17,18 @@
 python () {
     # Do nothing if multilib isn't being used
     if not d.getVar("MULTILIB_VARIANTS"):
-       return
+        return
     # Do nothing for native/cross
     if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d):
-       return
+        return
 
     for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split():
-       pkg, script = entry.split(":")
-       epkg = d.expand(pkg)
-       scriptname = os.path.basename(script)
-       d.appendVar("ALTERNATIVE_" + epkg, " " + scriptname + " ")
-       d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
-       d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
-       d.appendVar("multilibscript_rename",  "\n	mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
-       d.appendVar("FILES_" + epkg, " " + script + "-${MULTILIB_SUFFIX}")
+        pkg, script = entry.split(":")
+        epkg = d.expand(pkg)
+        scriptname = os.path.basename(script)
+        d.appendVar("ALTERNATIVE_" + epkg, " " + scriptname + " ")
+        d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
+        d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
+        d.appendVar("multilibscript_rename",  "\n	mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
+        d.appendVar("FILES_" + epkg, " " + script + "-${MULTILIB_SUFFIX}")
 }
diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass
index 20d72bb..8b89fb1 100644
--- a/poky/meta/classes/package.bbclass
+++ b/poky/meta/classes/package.bbclass
@@ -40,6 +40,7 @@
 
 inherit packagedata
 inherit chrpath
+inherit package_pkgdata
 
 # Need the package_qa_handle_error() in insane.bbclass
 inherit insane
@@ -1216,7 +1217,8 @@
                 src = os.path.join(src, p)
                 dest = os.path.join(dest, p)
                 fstat = cpath.stat(src)
-                os.mkdir(dest, fstat.st_mode)
+                os.mkdir(dest)
+                os.chmod(dest, fstat.st_mode)
                 os.chown(dest, fstat.st_uid, fstat.st_gid)
                 if p not in seen:
                     seen.append(p)
@@ -1356,12 +1358,16 @@
     import json
 
     def process_postinst_on_target(pkg, mlprefix):
+        pkgval = d.getVar('PKG_%s' % pkg)
+        if pkgval is None:
+            pkgval = pkg
+
         defer_fragment = """
 if [ -n "$D" ]; then
     $INTERCEPT_DIR/postinst_intercept delay_to_first_boot %s mlprefix=%s
     exit 0
 fi
-""" % (pkg, mlprefix)
+""" % (pkgval, mlprefix)
 
         postinst = d.getVar('pkg_postinst_%s' % pkg)
         postinst_ontarget = d.getVar('pkg_postinst_ontarget_%s' % pkg)
@@ -1570,7 +1576,7 @@
         d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files[pkg]))
 }
 
-SHLIBSDIRS = "${PKGDATA_DIR}/${MLPREFIX}shlibs2"
+SHLIBSDIRS = "${WORKDIR_PKGDATA}/${MLPREFIX}shlibs2"
 SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
 
 python package_do_shlibs() {
@@ -1728,10 +1734,7 @@
 
     needed = {}
 
-    # Take shared lock since we're only reading, not writing
-    lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
     shlib_provider = oe.package.read_shlib_providers(d)
-    bb.utils.unlockfile(lf)
 
     for pkg in shlib_pkgs:
         private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
@@ -1917,9 +1920,6 @@
                 f.write('%s\n' % p)
             f.close()
 
-    # Take shared lock since we're only reading, not writing
-    lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
-
     # Go from least to most specific since the last one found wins
     for dir in reversed(shlibs_dirs):
         if not os.path.exists(dir):
@@ -1935,8 +1935,6 @@
                 for l in lines:
                     pkgconfig_provided[pkg].append(l.rstrip())
 
-    bb.utils.unlockfile(lf)
-
     for pkg in packages.split():
         deps = []
         for n in pkgconfig_needed[pkg]:
@@ -2133,6 +2131,7 @@
 PACKAGE_PREPROCESS_FUNCS ?= ""
 # Functions for setting up PKGD
 PACKAGEBUILDPKGD ?= " \
+                package_prepare_pkgdata \
                 perform_packagecopy \
                 ${PACKAGE_PREPROCESS_FUNCS} \
                 split_and_strip_files \
@@ -2260,12 +2259,8 @@
 addtask packagedata before do_build after do_package
 
 SSTATETASKS += "do_packagedata"
-# PACKAGELOCK protects readers of PKGDATA_DIR against writes
-# whilst code is reading in do_package
-PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
 do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
 do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
-do_packagedata[sstate-lockfile] = "${PACKAGELOCK}"
 do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
 
 python do_packagedata_setscene () {
diff --git a/poky/meta/classes/package_ipk.bbclass b/poky/meta/classes/package_ipk.bbclass
index d1b317b..9f9da2f 100644
--- a/poky/meta/classes/package_ipk.bbclass
+++ b/poky/meta/classes/package_ipk.bbclass
@@ -14,7 +14,7 @@
 OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
 OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}"
 
-OPKGLIBDIR = "${localstatedir}/lib"
+OPKGLIBDIR ??= "${localstatedir}/lib"
 
 python do_package_ipk () {
     workdir = d.getVar('WORKDIR')
diff --git a/poky/meta/classes/package_pkgdata.bbclass b/poky/meta/classes/package_pkgdata.bbclass
new file mode 100644
index 0000000..18b7ed6
--- /dev/null
+++ b/poky/meta/classes/package_pkgdata.bbclass
@@ -0,0 +1,167 @@
+WORKDIR_PKGDATA = "${WORKDIR}/pkgdata-sysroot"
+
+def package_populate_pkgdata_dir(pkgdatadir, d):
+    import glob
+
+    postinsts = []
+    seendirs = set()
+    stagingdir = d.getVar("PKGDATA_DIR")
+    pkgarchs = ['${MACHINE_ARCH}']
+    pkgarchs = pkgarchs + list(reversed(d.getVar("PACKAGE_EXTRA_ARCHS").split()))
+    pkgarchs.append('allarch')
+
+    bb.utils.mkdirhier(pkgdatadir)
+    for pkgarch in pkgarchs:
+        for manifest in glob.glob(d.expand("${SSTATE_MANIFESTS}/manifest-%s-*.packagedata" % pkgarch)):
+            with open(manifest, "r") as f:
+                for l in f:
+                    l = l.strip()
+                    dest = l.replace(stagingdir, "")
+                    if l.endswith("/"):
+                        staging_copydir(l, pkgdatadir, dest, seendirs)
+                        continue
+                    try:
+                        staging_copyfile(l, pkgdatadir, dest, postinsts, seendirs)
+                    except FileExistsError:
+                        continue
+
+python package_prepare_pkgdata() {
+    import copy
+    import glob
+
+    taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+    mytaskname = d.getVar("BB_RUNTASK")
+    if mytaskname.endswith("_setscene"):
+        mytaskname = mytaskname.replace("_setscene", "")
+    workdir = d.getVar("WORKDIR")
+    pn = d.getVar("PN")
+    stagingdir = d.getVar("PKGDATA_DIR")
+    pkgdatadir = d.getVar("WORKDIR_PKGDATA")
+
+    # Detect bitbake -b usage
+    nodeps = d.getVar("BB_LIMITEDDEPS") or False
+    if nodeps:
+        staging_package_populate_pkgdata_dir(pkgdatadir, d)
+        return
+
+    start = None
+    configuredeps = []
+    for dep in taskdepdata:
+        data = taskdepdata[dep]
+        if data[1] == mytaskname and data[0] == pn:
+            start = dep
+            break
+    if start is None:
+        bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
+
+    # We need to figure out which sysroot files we need to expose to this task.
+    # This needs to match what would get restored from sstate, which is controlled
+    # ultimately by calls from bitbake to setscene_depvalid().
+    # That function expects a setscene dependency tree. We build a dependency tree
+    # condensed to inter-sstate task dependencies, similar to that used by setscene
+    # tasks. We can then call into setscene_depvalid() and decide
+    # which dependencies we can "see" and should expose in the recipe specific sysroot.
+    setscenedeps = copy.deepcopy(taskdepdata)
+
+    start = set([start])
+
+    sstatetasks = d.getVar("SSTATETASKS").split()
+    # Add recipe specific tasks referenced by setscene_depvalid()
+    sstatetasks.append("do_stash_locale")
+
+    # If start is an sstate task (like do_package) we need to add in its direct dependencies
+    # else the code below won't recurse into them.
+    for dep in set(start):
+        for dep2 in setscenedeps[dep][3]:
+            start.add(dep2)
+        start.remove(dep)
+
+    # Create collapsed do_populate_sysroot -> do_populate_sysroot tree
+    for dep in taskdepdata:
+        data = setscenedeps[dep]
+        if data[1] not in sstatetasks:
+            for dep2 in setscenedeps:
+                data2 = setscenedeps[dep2]
+                if dep in data2[3]:
+                    data2[3].update(setscenedeps[dep][3])
+                    data2[3].remove(dep)
+            if dep in start:
+                start.update(setscenedeps[dep][3])
+                start.remove(dep)
+            del setscenedeps[dep]
+
+    # Remove circular references
+    for dep in setscenedeps:
+        if dep in setscenedeps[dep][3]:
+            setscenedeps[dep][3].remove(dep)
+
+    # Direct dependencies should be present and can be depended upon
+    for dep in set(start):
+        if setscenedeps[dep][1] == "do_packagedata":
+            if dep not in configuredeps:
+                configuredeps.append(dep)
+
+    msgbuf = []
+    # Call into setscene_depvalid for each sub-dependency and only copy sysroot files
+    # for ones that would be restored from sstate.
+    done = list(start)
+    next = list(start)
+    while next:
+        new = []
+        for dep in next:
+            data = setscenedeps[dep]
+            for datadep in data[3]:
+                if datadep in done:
+                    continue
+                taskdeps = {}
+                taskdeps[dep] = setscenedeps[dep][:2]
+                taskdeps[datadep] = setscenedeps[datadep][:2]
+                retval = setscene_depvalid(datadep, taskdeps, [], d, msgbuf)
+                done.append(datadep)
+                new.append(datadep)
+                if retval:
+                    msgbuf.append("Skipping setscene dependency %s" % datadep)
+                    continue
+                if datadep not in configuredeps and setscenedeps[datadep][1] == "do_packagedata":
+                    configuredeps.append(datadep)
+                    msgbuf.append("Adding dependency on %s" % setscenedeps[datadep][0])
+                else:
+                    msgbuf.append("Following dependency on %s" % setscenedeps[datadep][0])
+        next = new
+
+    # This logging is too verbose for day to day use sadly
+    #bb.debug(2, "\n".join(msgbuf))
+
+    seendirs = set()
+    postinsts = []
+    multilibs = {}
+    manifests = {}
+
+    msg_adding = []
+
+    for dep in configuredeps:
+        c = setscenedeps[dep][0]
+        msg_adding.append(c)
+
+        manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "packagedata", d, multilibs)
+        destsysroot = pkgdatadir
+
+        if manifest:
+            targetdir = destsysroot
+            with open(manifest, "r") as f:
+                manifests[dep] = manifest
+                for l in f:
+                    l = l.strip()
+                    dest = targetdir + l.replace(stagingdir, "")
+                    if l.endswith("/"):
+                        staging_copydir(l, targetdir, dest, seendirs)
+                        continue
+                    staging_copyfile(l, targetdir, dest, postinsts, seendirs)
+
+    bb.note("Installed into pkgdata-sysroot: %s" % str(msg_adding))
+
+}
+package_prepare_pkgdata[cleandirs] = "${WORKDIR_PKGDATA}"
+package_prepare_pkgdata[vardepsexclude] += "MACHINE_ARCH PACKAGE_EXTRA_ARCHS SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
+
+
diff --git a/poky/meta/classes/package_rpm.bbclass b/poky/meta/classes/package_rpm.bbclass
index 1a64cb2..a605a57 100644
--- a/poky/meta/classes/package_rpm.bbclass
+++ b/poky/meta/classes/package_rpm.bbclass
@@ -36,7 +36,7 @@
     pkgd = d.getVar('PKGD')
 
     def dump_filerdeps(varname, outfile, d):
-        outfile.write("#!/usr/bin/env python\n\n")
+        outfile.write("#!/usr/bin/env python3\n\n")
         outfile.write("# Dependency table\n")
         outfile.write('deps = {\n')
         for pkg in packages.split():
diff --git a/poky/meta/classes/rootfs-postcommands.bbclass b/poky/meta/classes/rootfs-postcommands.bbclass
index 89f8efd..6cec23e 100644
--- a/poky/meta/classes/rootfs-postcommands.bbclass
+++ b/poky/meta/classes/rootfs-postcommands.bbclass
@@ -260,7 +260,7 @@
     with open(manifest_name, 'w+') as image_manifest:
         image_manifest.write(format_pkg_list(pkgs, "ver"))
 
-    if os.path.exists(manifest_name):
+    if os.path.exists(manifest_name) and link_name:
         manifest_link = deploy_dir + "/" + link_name + ".manifest"
         if os.path.lexists(manifest_link):
             os.remove(manifest_link)
@@ -328,7 +328,7 @@
     searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
     export2json(d, testdata_name, searchString=searchString, replaceString="")
 
-    if os.path.exists(testdata_name):
+    if os.path.exists(testdata_name) and link_name:
         testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name)
         if os.path.lexists(testdata_link):
             os.remove(testdata_link)
diff --git a/poky/meta/classes/rootfs_ipk.bbclass b/poky/meta/classes/rootfs_ipk.bbclass
index aabc370..e73d2bf 100644
--- a/poky/meta/classes/rootfs_ipk.bbclass
+++ b/poky/meta/classes/rootfs_ipk.bbclass
@@ -21,7 +21,7 @@
 
 OPKG_POSTPROCESS_COMMANDS = ""
 
-OPKGLIBDIR = "${localstatedir}/lib"
+OPKGLIBDIR ??= "${localstatedir}/lib"
 
 MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg"
 
diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass
index 424acfb..b604729 100644
--- a/poky/meta/classes/sstate.bbclass
+++ b/poky/meta/classes/sstate.bbclass
@@ -927,6 +927,10 @@
 
             bb.event.fire(bb.event.ProcessFinished(msg), d)
 
+    # Likely checking an individual task hash again for multiconfig sharing of sstate tasks so skip reporting
+    if len(sq_fn) == 1:
+        return ret
+
     inheritlist = d.getVar("INHERIT")
     if "toaster" in inheritlist:
         evdata = {'missed': [], 'found': []};
diff --git a/poky/meta/classes/staging.bbclass b/poky/meta/classes/staging.bbclass
index 9207060..cdc342d 100644
--- a/poky/meta/classes/staging.bbclass
+++ b/poky/meta/classes/staging.bbclass
@@ -261,12 +261,10 @@
     workdir = d.getVar("WORKDIR")
     #bb.warn(str(taskdepdata))
     pn = d.getVar("PN")
-    mc = d.getVar("BB_CURRENT_MC")
     stagingdir = d.getVar("STAGING_DIR")
     sharedmanifests = d.getVar("COMPONENTS_DIR") + "/manifests"
     recipesysroot = d.getVar("RECIPE_SYSROOT")
     recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE")
-    current_variant = d.getVar("BBEXTENDVARIANT")
 
     # Detect bitbake -b usage
     nodeps = d.getVar("BB_LIMITEDDEPS") or False
@@ -452,11 +450,6 @@
     msg_adding = []
 
     for dep in configuredeps:
-        if mc != 'default':
-            # We should not care about other multiconfigs
-            depmc = dep.split(':')[1]
-            if depmc != mc:
-                continue
         c = setscenedeps[dep][0]
         if c not in installed:
             continue
@@ -584,17 +577,6 @@
 }
 addtask do_prepare_recipe_sysroot before do_configure after do_fetch
 
-# Clean out the recipe specific sysroots before do_fetch
-# (use a prefunc so we can order before extend_recipe_sysroot if it gets added)
-python clean_recipe_sysroot() {
-    # We remove these stamps since we're removing any content they'd have added with
-    # cleandirs. This removes the sigdata too, likely not a big deal,
-    oe.path.remove(d.getVar("STAMP") + "*addto_recipe_sysroot*")
-    return
-}
-clean_recipe_sysroot[cleandirs] += "${RECIPE_SYSROOT} ${RECIPE_SYSROOT_NATIVE}"
-do_fetch[prefuncs] += "clean_recipe_sysroot"
-
 python staging_taskhandler() {
     bbtasks = e.tasklist
     for task in bbtasks:
diff --git a/poky/meta/classes/uboot-sign.bbclass b/poky/meta/classes/uboot-sign.bbclass
index de81ad1..982ed46 100644
--- a/poky/meta/classes/uboot-sign.bbclass
+++ b/poky/meta/classes/uboot-sign.bbclass
@@ -66,7 +66,7 @@
 		install ${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
 	elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "$deployed_uboot_dtb_binary" ]; then
 		cd ${DEPLOYDIR}
-		cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${UBOOT_BINARY} > ${UBOOT_IMAGE}
+		cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | tee ${B}/${CONFIG_B_PATH}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
 	else
 		bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
 	fi
@@ -77,10 +77,12 @@
 		mkdir -p ${DEPLOYDIR}
 		if [ -n "${UBOOT_CONFIG}" ]; then
 			for config in ${UBOOT_MACHINE}; do
+				CONFIG_B_PATH="${config}"
 				cd ${B}/${config}
 				concat_dtb_helper
 			done
 		else
+			CONFIG_B_PATH=""
 			cd ${B}
 			concat_dtb_helper
 		fi
diff --git a/poky/meta/classes/update-alternatives.bbclass b/poky/meta/classes/update-alternatives.bbclass
index b702e77..8c2b66e 100644
--- a/poky/meta/classes/update-alternatives.bbclass
+++ b/poky/meta/classes/update-alternatives.bbclass
@@ -284,8 +284,11 @@
 
             bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
-            postinst = d.getVar('pkg_postinst_%s' % pkg) or '#!/bin/sh\n'
-            postinst += alt_setup_links
+            postinst = d.getVar('pkg_postinst_%s' % pkg)
+            if postinst:
+                postinst = alt_setup_links + postinst
+            else:
+                postinst = '#!/bin/sh\n' + alt_setup_links
             d.setVar('pkg_postinst_%s' % pkg, postinst)
 
             bb.note('%s' % alt_remove_links)
diff --git a/poky/meta/classes/xmlcatalog.bbclass b/poky/meta/classes/xmlcatalog.bbclass
index 075aef8..ae4811f 100644
--- a/poky/meta/classes/xmlcatalog.bbclass
+++ b/poky/meta/classes/xmlcatalog.bbclass
@@ -1,3 +1,5 @@
+DEPENDS = "libxml2-native"
+
 # A whitespace-separated list of XML catalogs to be registered, for example
 # "${sysconfdir}/xml/docbook-xml.xml".
 XMLCATALOGS ?= ""
diff --git a/poky/meta/conf/bitbake.conf b/poky/meta/conf/bitbake.conf
index 4b907d6..140f45b 100644
--- a/poky/meta/conf/bitbake.conf
+++ b/poky/meta/conf/bitbake.conf
@@ -569,17 +569,17 @@
 export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
 BUILDSDK_CPPFLAGS = ""
 export CPPFLAGS = "${TARGET_CPPFLAGS}"
-export TARGET_CPPFLAGS = ""
+TARGET_CPPFLAGS = ""
 
 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
 BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
 export CFLAGS = "${TARGET_CFLAGS}"
-export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
+TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
 
 export BUILD_CXXFLAGS = "${BUILD_CFLAGS}"
 BUILDSDK_CXXFLAGS = "${BUILDSDK_CFLAGS}"
 export CXXFLAGS = "${TARGET_CXXFLAGS}"
-export TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
+TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
 
 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
                         -L${STAGING_BASE_LIBDIR_NATIVE} \
@@ -601,7 +601,7 @@
 ASNEEDED ?= "-Wl,--as-needed"
 
 export LDFLAGS = "${TARGET_LDFLAGS}"
-export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
+TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
 
 # Pass parallel make options to the compile task
 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
@@ -839,7 +839,7 @@
 DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation"
 DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation"
 
-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data ldconfig"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
 MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
 
 COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
diff --git a/poky/meta/conf/distro/defaultsetup.conf b/poky/meta/conf/distro/defaultsetup.conf
index 20e6123..9b1ee20 100644
--- a/poky/meta/conf/distro/defaultsetup.conf
+++ b/poky/meta/conf/distro/defaultsetup.conf
@@ -23,3 +23,6 @@
 INHERIT_BLACKLIST = "blacklist"
 INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
 INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
+
+INIT_MANAGER ??= "none"
+require conf/distro/include/init-manager-${INIT_MANAGER}.inc
diff --git a/poky/meta/conf/distro/include/default-providers.inc b/poky/meta/conf/distro/include/default-providers.inc
index 2be3378..8f4d44d 100644
--- a/poky/meta/conf/distro/include/default-providers.inc
+++ b/poky/meta/conf/distro/include/default-providers.inc
@@ -44,7 +44,6 @@
 PREFERRED_PROVIDER_console-tools ?= "kbd"
 PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
 PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
-PREFERRED_RPROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
 # Alternative is ltp-ddt in meta-oe: meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_0.0.4.bb
 PREFERRED_PROVIDER_ltp ?= "ltp"
 PREFERRED_PROVIDER_getopt ?= "util-linux-getopt"
diff --git a/poky/meta/conf/distro/include/init-manager-mdev-busybox.inc b/poky/meta/conf/distro/include/init-manager-mdev-busybox.inc
new file mode 100644
index 0000000..4e3be14
--- /dev/null
+++ b/poky/meta/conf/distro/include/init-manager-mdev-busybox.inc
@@ -0,0 +1,7 @@
+# enable mdev/busybox for init
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd sysvinit"
+VIRTUAL-RUNTIME_dev_manager ??= "busybox-mdev"
+VIRTUAL-RUNTIME_init_manager ??= "busybox"
+VIRTUAL-RUNTIME_initscripts ??= "initscripts"
+VIRTUAL-RUNTIME_keymaps ??= "keymaps"
+VIRTUAL-RUNTIME_login_manager ??= "busybox"
diff --git a/poky/meta/conf/distro/include/init-manager-none.inc b/poky/meta/conf/distro/include/init-manager-none.inc
new file mode 100644
index 0000000..bbedf89
--- /dev/null
+++ b/poky/meta/conf/distro/include/init-manager-none.inc
@@ -0,0 +1,3 @@
+VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
+VIRTUAL-RUNTIME_initscripts ??= "initscripts"
+VIRTUAL-RUNTIME_login_manager ??= "busybox"
diff --git a/poky/meta/conf/distro/include/init-manager-systemd.inc b/poky/meta/conf/distro/include/init-manager-systemd.inc
new file mode 100644
index 0000000..1558b85
--- /dev/null
+++ b/poky/meta/conf/distro/include/init-manager-systemd.inc
@@ -0,0 +1,6 @@
+# Use systemd for system initialization
+DISTRO_FEATURES_append = " systemd"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
+VIRTUAL-RUNTIME_init_manager ??= "systemd"
+VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units"
+VIRTUAL-RUNTIME_login_manager ??= "shadow-base"
diff --git a/poky/meta/conf/distro/include/init-manager-sysvinit.inc b/poky/meta/conf/distro/include/init-manager-sysvinit.inc
new file mode 100644
index 0000000..6b662d6
--- /dev/null
+++ b/poky/meta/conf/distro/include/init-manager-sysvinit.inc
@@ -0,0 +1,6 @@
+# Use sysvinit for system initialization
+DISTRO_FEATURES_append = " sysvinit"
+DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
+VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
+VIRTUAL-RUNTIME_initscripts ??= "initscripts"
+VIRTUAL-RUNTIME_login_manager ??= "busybox"
diff --git a/poky/meta/conf/distro/include/maintainers.inc b/poky/meta/conf/distro/include/maintainers.inc
index 64856e1..77a753a 100644
--- a/poky/meta/conf/distro/include/maintainers.inc
+++ b/poky/meta/conf/distro/include/maintainers.inc
@@ -136,7 +136,7 @@
 RECIPE_MAINTAINER_pn-cups = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-curl = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-cve-check-tool = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-cve-update-db = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-cve-update-db-native = "Ross Burton <ross.burton@intel.com>"
 RECIPE_MAINTAINER_pn-cwautomacros = "Ross Burton <ross.burton@intel.com>"
 RECIPE_MAINTAINER_pn-db = "Mark Hatle <mark.hatle@windriver.com>"
 RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
@@ -387,6 +387,7 @@
 RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <tanuk@iki.fi>"
 RECIPE_MAINTAINER_pn-libsolv = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-libsoup-2.4 = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-libssp-nonshared = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-libtasn1 = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-libtest-needs-perl = "Tim Orling <timothy.t.orling@linux.intel.com>"
 RECIPE_MAINTAINER_pn-libtheora = "Alexander Kanavin <alex.kanavin@gmail.com>"
@@ -517,6 +518,7 @@
 RECIPE_MAINTAINER_pn-mtdev = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-mtools = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-musl = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-musl-obstack = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-musl-utils = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-mx-1.0 = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
@@ -717,8 +719,10 @@
 RECIPE_MAINTAINER_pn-virglrenderer = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-vte = "Anuj Mittal <anuj.mittal@intel.com>"
-RECIPE_MAINTAINER_pn-vulkan = "Ross Burton <ross.burton@intel.com>"
 RECIPE_MAINTAINER_pn-vulkan-demos = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-headers = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-loader = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER_pn-vulkan-tools = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-waffle = "Ross Burton <ross.burton@intel.com>"
 RECIPE_MAINTAINER_pn-watchdog = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-watchdog-config = "Alexander Kanavin <alex.kanavin@gmail.com>"
diff --git a/poky/meta/files/ext-sdk-prepare.py b/poky/meta/files/ext-sdk-prepare.py
index 96c5212..163d5e9 100644
--- a/poky/meta/files/ext-sdk-prepare.py
+++ b/poky/meta/files/ext-sdk-prepare.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Prepare the build system within the extensible SDK
 
diff --git a/poky/meta/lib/oe/buildhistory_analysis.py b/poky/meta/lib/oe/buildhistory_analysis.py
index 62c7a2e..708e1b3 100644
--- a/poky/meta/lib/oe/buildhistory_analysis.py
+++ b/poky/meta/lib/oe/buildhistory_analysis.py
@@ -181,7 +181,7 @@
             diff = difflib.unified_diff(alines, blines, self.fieldname, self.fieldname, lineterm='')
             out += '\n  '.join(list(diff)[2:])
             out += '\n  --'
-        elif self.fieldname in img_monitor_files or '/image-files/' in self.path:
+        elif self.fieldname in img_monitor_files or '/image-files/' in self.path or self.fieldname == "sysroot":
             if self.filechanges or (self.oldvalue and self.newvalue):
                 fieldname = self.fieldname
                 if '/image-files/' in self.path:
@@ -282,7 +282,7 @@
     return adict
 
 
-def compare_file_lists(alines, blines):
+def compare_file_lists(alines, blines, compare_ownership=True):
     adict = file_list_to_dict(alines)
     bdict = file_list_to_dict(blines)
     filechanges = []
@@ -294,16 +294,20 @@
             newvalue = newsplitv[0][0]
             if oldvalue != newvalue:
                 filechanges.append(FileChange(path, FileChange.changetype_type, oldvalue, newvalue))
+
             # Check permissions
             oldvalue = splitv[0][1:]
             newvalue = newsplitv[0][1:]
             if oldvalue != newvalue:
                 filechanges.append(FileChange(path, FileChange.changetype_perms, oldvalue, newvalue))
-            # Check owner/group
-            oldvalue = '%s/%s' % (splitv[1], splitv[2])
-            newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
-            if oldvalue != newvalue:
-                filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
+
+            if compare_ownership:
+                # Check owner/group
+                oldvalue = '%s/%s' % (splitv[1], splitv[2])
+                newvalue = '%s/%s' % (newsplitv[1], newsplitv[2])
+                if oldvalue != newvalue:
+                    filechanges.append(FileChange(path, FileChange.changetype_ownergroup, oldvalue, newvalue))
+
             # Check symlink target
             if newsplitv[0][0] == 'l':
                 if len(splitv) > 3:
@@ -571,6 +575,15 @@
             elif filename.startswith('latest.'):
                 chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True)
                 changes.append(chg)
+            elif filename == 'sysroot':
+                alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
+                blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
+                filechanges = compare_file_lists(alines,blines, compare_ownership=False)
+                if filechanges:
+                    chg = ChangeRecord(path, filename, None, None, True)
+                    chg.filechanges = filechanges
+                    changes.append(chg)
+
         elif path.startswith('images/'):
             filename = os.path.basename(d.a_blob.path)
             if filename in img_monitor_files:
diff --git a/poky/meta/lib/oe/copy_buildsystem.py b/poky/meta/lib/oe/copy_buildsystem.py
index 5b96121..246ff58 100644
--- a/poky/meta/lib/oe/copy_buildsystem.py
+++ b/poky/meta/lib/oe/copy_buildsystem.py
@@ -45,6 +45,9 @@
 
         corebase = os.path.abspath(self.d.getVar('COREBASE'))
         layers.append(corebase)
+        # Get relationship between TOPDIR and COREBASE
+        # Layers should respect it
+        corebase_relative = os.path.dirname(os.path.relpath(os.path.abspath(self.d.getVar('TOPDIR')), corebase))
         # The bitbake build system uses the meta-skeleton layer as a layout
         # for common recipies, e.g: the recipetool script to create kernel recipies
         # Add the meta-skeleton layer to be included as part of the eSDK installation
@@ -98,7 +101,10 @@
             if corebase == os.path.dirname(layer):
                 layerdestpath += '/' + os.path.basename(corebase)
             else:
-                layer_relative = os.path.basename(corebase) + '/' + os.path.relpath(layer, corebase)
+                layer_relative = os.path.relpath(layer, corebase)
+                if os.path.dirname(layer_relative) == corebase_relative:
+                    layer_relative = os.path.dirname(corebase_relative) + '/' + layernewname
+                layer_relative = os.path.basename(corebase) + '/' + layer_relative
                 if os.path.dirname(layer_relative) != layernewname:
                     layerdestpath += '/' + os.path.dirname(layer_relative)
 
diff --git a/poky/meta/lib/oe/package_manager.py b/poky/meta/lib/oe/package_manager.py
index 06feb4d..7c37371 100644
--- a/poky/meta/lib/oe/package_manager.py
+++ b/poky/meta/lib/oe/package_manager.py
@@ -1297,6 +1297,8 @@
         rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
                                   % self.target_rootfs)
 
+        os.makedirs('%s/etc/opkg' % self.target_rootfs, exist_ok=True)
+
         feed_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split())
         archs = self.pkg_archs.split() if feed_archs is None else feed_archs.split()
 
diff --git a/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py b/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py
index 0f5f9f4..3a8271a 100644
--- a/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py
+++ b/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -6,6 +6,7 @@
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.data import skipIfDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
+import time
 
 class SyslogTest(OERuntimeTestCase):
 
@@ -21,12 +22,72 @@
 
 class SyslogTestConfig(OERuntimeTestCase):
 
+    def verif_not_running(self, pids):
+        for pid in pids:
+            status, err_output = self.target.run('kill -0 %s' %pid)
+            if not status:
+                self.logger.debug("previous %s is still running" %pid)
+                return 1
+
+    def verify_running(self, names):
+        pids = []
+        for name in names:
+            status, pid = self.target.run('pidof %s' %name)
+            if status:
+                self.logger.debug("%s is not running" %name)
+                return 1, pids
+            pids.append(pid)
+        return 0, pids
+
+
+    def restart_sanity(self, names, restart_cmd, pidchange=True):
+        status, original_pids = self.verify_running(names)
+        if status:
+            return False
+
+        status, output = self.target.run(restart_cmd)
+
+        msg = ('Could not restart %s service. Status and output: %s and %s' % (names, status, output))
+        self.assertEqual(status, 0, msg)
+
+        if not pidchange:
+            return True
+
+        # Always check for an error, most likely a race between shutting down and starting up
+        timeout = time.time() + 30
+
+        restarted = False
+        status = ""
+        while time.time() < timeout:
+            # Verify the previous ones are no longer running
+            status = self.verif_not_running(original_pids)
+            if status:
+                status = "Original syslog processes still running"
+                continue
+
+            status, pids = self.verify_running(names)
+            if status:
+                status = "New syslog processes not running"
+                continue
+
+            # Everything is fine now, so exit to continue the test
+            restarted = True
+            break
+
+        msg = ('%s didn\'t appear to restart: %s' % (names, status))
+        self.assertTrue(restarted, msg)
+
+        return True
+
     @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
     def test_syslog_logger(self):
         status, output = self.target.run('logger foobar')
         msg = "Can't log into syslog. Output: %s " % output
         self.assertEqual(status, 0, msg=msg)
 
+        # There is no way to flush the logger to disk in all cases
+        time.sleep(1)
+
         status, output = self.target.run('grep foobar /var/log/messages')
         if status != 0:
             if self.tc.td.get("VIRTUAL-RUNTIME_init_manager") == "systemd":
@@ -37,12 +98,17 @@
                ' Output: %s ' % output)
         self.assertEqual(status, 0, msg=msg)
 
+
     @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
     def test_syslog_restart(self):
-        if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""):
-            (_, _) = self.target.run('/etc/init.d/syslog restart')
+        if self.restart_sanity(['systemd-journald'], 'systemctl restart syslog.service', pidchange=False):
+            pass
+        elif self.restart_sanity(['rsyslogd'], '/etc/init.d/rsyslog restart'):
+            pass
+        elif self.restart_sanity(['syslogd', 'klogd'], '/etc/init.d/syslog restart'):
+            pass
         else:
-            (_, _) = self.target.run('systemctl restart syslog.service')
+            self.logger.info("No syslog found to restart, ignoring")
 
 
     @OETestDepends(['oe_syslog.SyslogTestConfig.test_syslog_logger'])
@@ -52,10 +118,8 @@
     def test_syslog_startup_config(self):
         cmd = 'echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf'
         self.target.run(cmd)
-        status, output = self.target.run('/etc/init.d/syslog restart')
-        msg = ('Could not restart syslog service. Status and output:'
-               ' %s and %s' % (status,output))
-        self.assertEqual(status, 0, msg)
+
+        self.test_syslog_restart()
 
         cmd = 'logger foobar && grep foobar /var/log/test'
         status,output = self.target.run(cmd)
@@ -64,4 +128,4 @@
 
         cmd = "sed -i 's#LOGFILE=/var/log/test##' /etc/syslog-startup.conf"
         self.target.run(cmd)
-        self.target.run('/etc/init.d/syslog restart')
+        self.test_syslog_restart()
diff --git a/poky/meta/lib/oeqa/runtime/cases/rpm.py b/poky/meta/lib/oeqa/runtime/cases/rpm.py
index d8cabd3..8e18b42 100644
--- a/poky/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/poky/meta/lib/oeqa/runtime/cases/rpm.py
@@ -4,6 +4,7 @@
 
 import os
 import fnmatch
+import time
 
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
@@ -29,6 +30,53 @@
         msg = 'status and output: %s and %s' % (status, output)
         self.assertEqual(status, 0, msg=msg)
 
+    @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
+    def test_rpm_query_nonroot(self):
+
+        def set_up_test_user(u):
+            status, output = self.target.run('id -u %s' % u)
+            if status:
+                status, output = self.target.run('useradd %s' % u)
+                msg = 'Failed to create new user: %s' % output
+                self.assertTrue(status == 0, msg=msg)
+
+        def exec_as_test_user(u):
+            status, output = self.target.run('su -c id %s' % u)
+            msg = 'Failed to execute as new user'
+            self.assertTrue("({0})".format(u) in output, msg=msg)
+
+            status, output = self.target.run('su -c "rpm -qa" %s ' % u)
+            msg = 'status: %s. Cannot run rpm -qa: %s' % (status, output)
+            self.assertEqual(status, 0, msg=msg)
+
+        def check_no_process_for_user(u):
+            _, output = self.target.run(self.tc.target_cmds['ps'])
+            if u + ' ' in output:
+                return False
+            else:
+                return True
+
+        def unset_up_test_user(u):
+            # ensure no test1 process in running
+            timeout = time.time() + 30
+            while time.time() < timeout:
+                if check_no_process_for_user(u):
+                    break
+                else:
+                    time.sleep(1)
+            status, output = self.target.run('userdel -r %s' % u)
+            msg = 'Failed to erase user: %s' % output
+            self.assertTrue(status == 0, msg=msg)
+
+        tuser = 'test1'
+
+        try:
+            set_up_test_user(tuser)
+            exec_as_test_user(tuser)
+        finally:
+            unset_up_test_user(tuser)
+
+
 class RpmInstallRemoveTest(OERuntimeTestCase):
 
     @classmethod
@@ -58,38 +106,6 @@
         msg = 'Failed to remove base-passwd-doc package: %s' % output
         self.assertEqual(status, 0, msg=msg)
 
-    @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
-    def test_rpm_query_nonroot(self):
-
-        def set_up_test_user(u):
-            status, output = self.target.run('id -u %s' % u)
-            if status:
-                status, output = self.target.run('useradd %s' % u)
-                msg = 'Failed to create new user: %s' % output
-                self.assertTrue(status == 0, msg=msg)
-
-        def exec_as_test_user(u):
-            status, output = self.target.run('su -c id %s' % u)
-            msg = 'Failed to execute as new user'
-            self.assertTrue("({0})".format(u) in output, msg=msg)
-
-            status, output = self.target.run('su -c "rpm -qa" %s ' % u)
-            msg = 'status: %s. Cannot run rpm -qa: %s' % (status, output)
-            self.assertEqual(status, 0, msg=msg)
-
-        def unset_up_test_user(u):
-            status, output = self.target.run('userdel -r %s' % u)
-            msg = 'Failed to erase user: %s' % output
-            self.assertTrue(status == 0, msg=msg)
-
-        tuser = 'test1'
-
-        try:
-            set_up_test_user(tuser)
-            exec_as_test_user(tuser)
-        finally:
-            unset_up_test_user(tuser)
-
     @OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_remove'])
     def test_check_rpm_install_removal_log_file_size(self):
         """
diff --git a/poky/meta/lib/oeqa/selftest/cases/bbtests.py b/poky/meta/lib/oeqa/selftest/cases/bbtests.py
index e9ad44b..17da0fd 100644
--- a/poky/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/poky/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -40,7 +40,7 @@
     def test_event_handler(self):
         self.write_config("INHERIT += \"test_events\"")
         result = bitbake('m4-native')
-        find_build_started = re.search(r"NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing RunQueue Tasks", result.output)
+        find_build_started = re.search(r"NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing.*Tasks", result.output)
         find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
         self.assertTrue(find_build_started, msg = "Match failed in:\n%s"  % result.output)
         self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
@@ -242,6 +242,36 @@
             self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
                                              'Executed tasks were: %s' % (task, str(tasks)))
 
+    def test_skip_setscene(self):
+        test_recipe = 'ed'
+
+        bitbake(test_recipe)
+        bitbake('-c clean %s' % test_recipe)
+
+        ret = bitbake('--setscene-only %s' % test_recipe)
+        tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+        for task in tasks:
+            self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
+                                             'Executed tasks were: %s' % (task, str(tasks)))
+
+        # Run without setscene. Should do nothing
+        ret = bitbake('--skip-setscene %s' % test_recipe)
+        tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+        self.assertFalse(tasks, 'Tasks %s ran when they should not have' % (str(tasks)))
+
+        # Clean (leave sstate cache) and run with --skip-setscene. No setscene
+        # tasks should run
+        bitbake('-c clean %s' % test_recipe)
+
+        ret = bitbake('--skip-setscene %s' % test_recipe)
+        tasks = re.findall(r'task\s+(do_\S+):', ret.output)
+
+        for task in tasks:
+            self.assertNotIn('_setscene', task, 'A _setscene task ran: %s.\n'
+                                                'Executed tasks were: %s' % (task, str(tasks)))
+
     def test_bbappend_order(self):
         """ Bitbake should bbappend to recipe in a predictable order """
         test_recipe = 'ed'
diff --git a/poky/meta/lib/oeqa/selftest/cases/buildoptions.py b/poky/meta/lib/oeqa/selftest/cases/buildoptions.py
index 3ad65b4..6a5378d 100644
--- a/poky/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/poky/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -162,17 +162,14 @@
         self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/allarch*/xcursor*" % deploy_dir_src)
 
 class ToolchainOptions(OESelftestTestCase):
-
     def test_toolchain_fortran(self):
         """
-        Test whether we can enable and build fortran and its supporting libraries
+        Test that Fortran works by building a Hello, World binary.
         """
 
         features = 'FORTRAN_forcevariable = ",fortran"\n'
-        features += 'RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"\n'
         self.write_config(features)
-
-        bitbake('gcc-runtime libgfortran')
+        bitbake('fortran-helloworld')
 
 class SourceMirroring(OESelftestTestCase):
     # Can we download everything from the Yocto Sources Mirror over http only
diff --git a/poky/meta/lib/oeqa/selftest/cases/devtool.py b/poky/meta/lib/oeqa/selftest/cases/devtool.py
index 904ff69..6fe145c 100644
--- a/poky/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/poky/meta/lib/oeqa/selftest/cases/devtool.py
@@ -240,6 +240,9 @@
         # Check preconditions
         result = runCmd('bitbake-layers show-layers')
         self.assertTrue('\nworkspace' not in result.output, 'This test cannot be run with a workspace layer in bblayers.conf')
+        # remove conf/devtool.conf to avoid it corrupting tests
+        devtoolconf = os.path.join(self.builddir, 'conf', 'devtool.conf')
+        self.track_for_cleanup(devtoolconf)
         # Try creating a workspace layer with a specific path
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)
diff --git a/poky/meta/lib/oeqa/selftest/cases/recipetool.py b/poky/meta/lib/oeqa/selftest/cases/recipetool.py
index e3f5c71..1c701a4 100644
--- a/poky/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/poky/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -406,22 +406,19 @@
         self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits)
 
     def test_recipetool_create_cmake(self):
-        bitbake('-c packagedata gtk+')
-
-        # Try adding a recipe
         temprecipe = os.path.join(self.tempdir, 'recipe')
         os.makedirs(temprecipe)
-        recipefile = os.path.join(temprecipe, 'navit_0.5.0.bb')
-        srcuri = 'http://downloads.yoctoproject.org/mirror/sources/navit-0.5.0.tar.gz'
+        recipefile = os.path.join(temprecipe, 'taglib_1.11.1.bb')
+        srcuri = 'http://taglib.github.io/releases/taglib-1.11.1.tar.gz'
         result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
         self.assertTrue(os.path.isfile(recipefile))
         checkvars = {}
-        checkvars['LICENSE'] = set(['Unknown', 'GPLv2', 'LGPLv2'])
-        checkvars['SRC_URI'] = 'http://downloads.yoctoproject.org/mirror/sources/navit-${PV}.tar.gz'
-        checkvars['SRC_URI[md5sum]'] = '242f398e979a6b8c0f3c802b63435b68'
-        checkvars['SRC_URI[sha256sum]'] = '13353481d7fc01a4f64e385dda460b51496366bba0fd2cc85a89a0747910e94d'
-        checkvars['DEPENDS'] = set(['freetype', 'zlib', 'openssl', 'glib-2.0', 'virtual/libgl', 'virtual/egl', 'gtk+', 'libpng', 'libsdl', 'freeglut', 'dbus-glib', 'fribidi'])
-        inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig']
+        checkvars['LICENSE'] = set(['LGPLv2.1', 'MPL-1.1'])
+        checkvars['SRC_URI'] = 'http://taglib.github.io/releases/taglib-${PV}.tar.gz'
+        checkvars['SRC_URI[md5sum]'] = 'cee7be0ccfc892fa433d6c837df9522a'
+        checkvars['SRC_URI[sha256sum]'] = 'b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b'
+        checkvars['DEPENDS'] = set(['boost', 'zlib'])
+        inherits = ['cmake']
         self._test_recipe_contents(recipefile, checkvars, inherits)
 
     def test_recipetool_create_github(self):
diff --git a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py
index d817b75..20969d2 100644
--- a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -153,6 +153,7 @@
 
         # Enable package feed signing
         self.gpg_home = tempfile.mkdtemp(prefix="oeqa-feed-sign-")
+        self.track_for_cleanup(self.gpg_home)
         signing_key_dir = os.path.join(self.testlayer_path, 'files', 'signing')
         runCmd('gpg --batch --homedir %s --import %s' % (self.gpg_home, os.path.join(signing_key_dir, 'key.secret')), native_sysroot=get_bb_var("RECIPE_SYSROOT_NATIVE", "gnupg-native"))
         features += 'INHERIT += "sign_package_feed"\n'
@@ -165,9 +166,6 @@
         bitbake('core-image-full-cmdline socat')
         bitbake('-c testimage core-image-full-cmdline')
 
-        # remove the oeqa-feed-sign temporal directory
-        shutil.rmtree(self.gpg_home, ignore_errors=True)
-
     def test_testimage_virgl_gtk(self):
         """
         Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk frontend
diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py
index d16eae5..928c476 100644
--- a/poky/meta/lib/oeqa/selftest/cases/wic.py
+++ b/poky/meta/lib/oeqa/selftest/cases/wic.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright (c) 2015, Intel Corporation.
 #
@@ -500,7 +499,8 @@
         wicvars = set(bb_vars['WICVARS'].split())
         # filter out optional variables
         wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES',
-                                      'INITRD', 'INITRD_LIVE', 'ISODIR'))
+                                      'INITRD', 'INITRD_LIVE', 'ISODIR','INITRAMFS_IMAGE',
+                                      'INITRAMFS_IMAGE_BUNDLE', 'INITRAMFS_LINK_NAME'))
         with open(path) as envfile:
             content = dict(line.split("=", 1) for line in envfile)
             # test if variables used by wic present in the .env file
@@ -681,6 +681,65 @@
             out = glob(self.resultdir + "%s-*direct" % wksname)
             self.assertEqual(1, len(out))
 
+    @only_for_arch(['i586', 'i686', 'x86_64'])
+    def test_biosplusefi_plugin_qemu(self):
+        """Test biosplusefi plugin in qemu"""
+        for fstype in ("ext4", "wic"):
+            config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' % fstype
+            self.append_config(config)
+            self.assertEqual(0, bitbake('core-image-minimal').status)
+            self.remove_config(config)
+
+        with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu:
+            # Check that we have ONLY two /dev/sda* partitions (/boot and /)
+            cmd = "grep sda. /proc/partitions | wc -l"
+            status, output = qemu.run_serial(cmd)
+            self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+            self.assertEqual(output, '2')
+            # Check that /dev/sda1 is /boot and that either /dev/root OR /dev/sda2 is /
+            cmd = "mount | grep '^/dev/' | cut -f1,3 -d ' ' | egrep -c -e '/dev/sda1 /boot' -e '/dev/root /|/dev/sda2 /'"
+            status, output = qemu.run_serial(cmd)
+            self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+            self.assertEqual(output, '2')
+            # Check that /boot has EFI bootx64.efi (required for EFI)
+            cmd = "ls /boot/EFI/BOOT/bootx64.efi | wc -l"
+            status, output = qemu.run_serial(cmd)
+            self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+            self.assertEqual(output, '1')
+            # Check that "BOOTABLE" flag is set on boot partition (required for PC-Bios)
+            # Trailing "cat" seems to be required; otherwise run_serial() sends back echo of the input command
+            cmd = "fdisk -l /dev/sda | grep /dev/sda1 | awk {print'$2'} | cat"
+            status, output = qemu.run_serial(cmd)
+            self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+            self.assertEqual(output, '*')
+
+    @only_for_arch(['i586', 'i686', 'x86_64'])
+    def test_biosplusefi_plugin(self):
+        """Test biosplusefi plugin"""
+        # Wic generation below may fail depending on the order of the unittests
+        # This is because bootimg-pcbios (that bootimg-biosplusefi uses) generate its MBR inside STAGING_DATADIR directory
+        #    which may or may not exists depending on what was built already
+        # If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir()
+        #   will raise with "Couldn't find correct bootimg_dir"
+        # The easiest way to work-around this issue is to make sure we already built an image here, hence the bitbake call
+        for fstype in ("ext4", "wic"):
+            config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n' % fstype
+            self.append_config(config)
+            self.assertEqual(0, bitbake('core-image-minimal').status)
+            self.remove_config(config)
+
+        img = 'core-image-minimal'
+        with NamedTemporaryFile("w", suffix=".wks") as wks:
+            wks.writelines(['part /boot --active --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\n',
+                            'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\
+                            'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n'])
+            wks.flush()
+            cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+            runCmd(cmd)
+            wksname = os.path.splitext(os.path.basename(wks.name))[0]
+            out = glob(self.resultdir + "%s-*.direct" % wksname)
+            self.assertEqual(1, len(out))
+
     def test_fs_types(self):
         """Test filesystem types for empty and not empty partitions"""
         img = 'core-image-minimal'
diff --git a/poky/meta/lib/oeqa/utils/logparser.py b/poky/meta/lib/oeqa/utils/logparser.py
index b31214b..7313df8 100644
--- a/poky/meta/lib/oeqa/utils/logparser.py
+++ b/poky/meta/lib/oeqa/utils/logparser.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # SPDX-License-Identifier: MIT
 #
diff --git a/poky/meta/lib/oeqa/utils/qemurunner.py b/poky/meta/lib/oeqa/utils/qemurunner.py
index c16227f..b1999fd 100644
--- a/poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/poky/meta/lib/oeqa/utils/qemurunner.py
@@ -98,7 +98,7 @@
     def handleSIGCHLD(self, signum, frame):
         if self.runqemu and self.runqemu.poll():
             if self.runqemu.returncode:
-                self.logger.debug('runqemu exited with code %d' % self.runqemu.returncode)
+                self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode)
                 self.logger.debug("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout))
                 self.stop()
                 self._dump_host()
@@ -208,9 +208,9 @@
             if self.runqemu.poll():
                 if self.runqemu.returncode:
                     # No point waiting any longer
-                    self.logger.debug('runqemu exited with code %d' % self.runqemu.returncode)
+                    self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode)
                     self._dump_host()
-                    self.logger.debug("Output from runqemu:\n%s" % self.getOutput(output))
+                    self.logger.warning("Output from runqemu:\n%s" % self.getOutput(output))
                     self.stop()
                     return False
             time.sleep(0.5)
@@ -329,14 +329,14 @@
 
         if not reachedlogin:
             if time.time() >= endtime:
-                self.logger.debug("Target didn't reach login banner in %d seconds (%s)" %
+                self.logger.warning("Target didn't reach login banner in %d seconds (%s)" %
                                   (self.boottime, time.strftime("%D %H:%M:%S")))
             tail = lambda l: "\n".join(l.splitlines()[-25:])
             bootlog = bootlog.decode("utf-8")
             # in case bootlog is empty, use tail qemu log store at self.msg
             lines = tail(bootlog if bootlog else self.msg)
-            self.logger.debug("Last 25 lines of text:\n%s" % lines)
-            self.logger.debug("Check full boot log: %s" % self.logfile)
+            self.logger.warning("Last 25 lines of text:\n%s" % lines)
+            self.logger.warning("Check full boot log: %s" % self.logfile)
             self._dump_host()
             self.stop()
             return False
@@ -356,11 +356,11 @@
                     else:
                         self.logger.debug("Couldn't configure guest networking")
             else:
-                self.logger.debug("Couldn't login into serial console"
+                self.logger.warning("Couldn't login into serial console"
                             " as root using blank password")
-                self.logger.debug("The output:\n%s" % output)
+                self.logger.warning("The output:\n%s" % output)
         except:
-            self.logger.debug("Serial console failed while trying to login")
+            self.logger.warning("Serial console failed while trying to login")
         return True
 
     def stop(self):
@@ -414,7 +414,7 @@
             self.thread.join()
 
     def restart(self, qemuparams = None):
-        self.logger.debug("Restarting qemu process")
+        self.logger.warning("Restarting qemu process")
         if self.runqemu.poll() is None:
             self.stop()
         if self.start(qemuparams):
@@ -425,13 +425,20 @@
         if not self.runqemu or self.runqemu.poll() is not None:
             return False
         if os.path.isfile(self.qemu_pidfile):
-            f = open(self.qemu_pidfile, 'r')
-            qemu_pid = f.read()
-            f.close()
-            qemupid = int(qemu_pid)
-            if os.path.exists("/proc/" + str(qemupid)):
-                self.qemupid = qemupid
-                return True
+            # when handling pidfile, qemu creates the file, stat it, lock it and then write to it
+            # so it's possible that the file has been created but the content is empty
+            pidfile_timeout = time.time() + 3
+            while time.time() < pidfile_timeout:
+                with open(self.qemu_pidfile, 'r') as f:
+                    qemu_pid = f.read().strip()
+                # file created but not yet written contents
+                if not qemu_pid:
+                    time.sleep(0.5)
+                    continue
+                else:
+                    if os.path.exists("/proc/" + qemu_pid):
+                        self.qemupid = int(qemu_pid)
+                        return True
         return False
 
     def run_serial(self, command, raw=False, timeout=60):
diff --git a/poky/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch b/poky/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch
new file mode 100644
index 0000000..9525ed8
--- /dev/null
+++ b/poky/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch
@@ -0,0 +1,83 @@
+From 97668ae0bce776a36ea2001dea63d376be8274ac Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Wed, 6 Mar 2019 13:08:33 -0500
+Subject: [PATCH] Make sure PKGS= is propogated into the submake for "make
+ deps"
+
+When we're doing make deps with "$(CC) -MF", gcc and clang have different
+behavior, both broken in different ways, which we're hitting because of a
+missing -I argument for libefivar's includes.  On clang, when a header can't
+be found, it emits a rule with the header as a prerequisite without a path,
+such as efivar.h here:
+
+efibootmgr.o: efibootmgr.c fix_coverity.h efivar.h efiboot.h \
+  /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
+  /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+  /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
+  /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
+  error.h
+
+Then the build that utilizes that rule will fail to find the
+prerequisite and tell you something like:
+
+make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'.  Stop.
+make[1]: Leaving directory '/home/pjones/devel/github.com/efibootmgr/master/src'
+
+With gcc, when a header can't be found, it emits a rule without that header
+as a prerequisite, as such (again with efivar.h):
+
+efibootmgr.o: efibootmgr.c fix_coverity.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
+ error.h
+
+And then your build will fail if you haven't adjusted CFLAGS to tell it
+where to find the header.
+
+Both of these would be better just erroring, but at least gcc's doesn't
+insert a *wrong* dependency.
+
+This patch adds "PKGS=efivar efibootmgr popt" for all deps under src/.
+Technically that's overkill, as efibootmgr itself doesn't need popt, but it
+doesn't hurt anything to have the extra part there.  The resulting
+.efibootmgr.d file has the prerequisites expressed correctly:
+
+efibootmgr.o: efibootmgr.c fix_coverity.h /usr/include/efivar/efivar.h \
+ /usr/include/efivar/efiboot.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \
+ /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \
+ error.h
+
+This fixes the issue described in github PR #96
+
+Signed-off-by: Peter Jones <pjones@redhat.com>
+Upstream-Status: Backport [https://github.com/rhboot/efibootmgr/commit/97668ae0bce776a36ea2001dea63d376be8274ac]
+---
+ src/Makefile | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 258bac1..32fa188 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -31,8 +31,13 @@ efibootdump : PKGS=efivar efiboot popt
+ efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES))
+ efibootnext : PKGS=efivar efiboot popt
+ 
++deps : PKGS=efivar efiboot popt
+ deps : $(ALL_SOURCES)
+-	$(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)"
++	$(MAKE) -f $(TOPDIR)/Make.deps \
++		SOURCES="$(ALL_SOURCES)" \
++		SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" \
++		PKGS="$(PKGS)" \
++		deps
+ 
+ clean :
+ 	@rm -rfv *.o *.a *.so $(TARGETS)
diff --git a/poky/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb b/poky/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
index 0e5a81e..5d6f200 100644
--- a/poky/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
+++ b/poky/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb
@@ -12,6 +12,7 @@
 
 SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https \
            file://0001-remove-extra-decl.patch \
+           file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \
           "
 SRCREV = "e067160ecef8208e1944002e5d50b275733211fb"
 
diff --git a/poky/meta/recipes-bsp/efivar/efivar_37.bb b/poky/meta/recipes-bsp/efivar/efivar_37.bb
index c4254c7..9b95721 100644
--- a/poky/meta/recipes-bsp/efivar/efivar_37.bb
+++ b/poky/meta/recipes-bsp/efivar/efivar_37.bb
@@ -23,7 +23,10 @@
 
 do_compile_prepend() {
     # Remove when https://github.com/rhboot/efivar/issues/130 is fixed
-    oe_runmake CFLAGS="${BUILD_CFLAGS}" -C src makeguids
+    oe_runmake \
+        CFLAGS="${BUILD_CFLAGS}" \
+        LDFLAGS="${BUILD_LDFLAGS}" \
+        -C src makeguids
 }
 
 do_install() {
diff --git a/poky/meta/recipes-bsp/grub/grub2.inc b/poky/meta/recipes-bsp/grub/grub2.inc
index bac2d7d..c5ff10e 100644
--- a/poky/meta/recipes-bsp/grub/grub2.inc
+++ b/poky/meta/recipes-bsp/grub/grub2.inc
@@ -60,13 +60,11 @@
 BUILD_CXXFLAGS = ""
 BUILD_LDFLAGS = ""
 
+export PYTHON = "python3"
+
 CFLAGS_append = " -Wno-error"
 
 do_configure_prepend() {
-	# The grub2 configure script uses variables such as TARGET_CFLAGS etc
-	# for its own purposes. Remove the OE versions from the environment to
-	# avoid conflicts.
-	unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
 	( cd ${S}
 	${S}/autogen.sh )
 }
diff --git a/poky/meta/recipes-bsp/opensbi/files/0002-lib-Create-a-sbi_ipi_data-structure.patch b/poky/meta/recipes-bsp/opensbi/files/0002-lib-Create-a-sbi_ipi_data-structure.patch
deleted file mode 100644
index 3c846bd..0000000
--- a/poky/meta/recipes-bsp/opensbi/files/0002-lib-Create-a-sbi_ipi_data-structure.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 508a27204cbbca0a9430236e56681e5e0d343fb9 Mon Sep 17 00:00:00 2001
-From: Alistair Francis <alistair.francis@wdc.com>
-Date: Fri, 8 Mar 2019 11:22:22 -0800
-Subject: [PATCH] lib: Create a sbi_ipi_data structure
-
-Create a sbi_ipi_data structure that holds unpacked IPI information. At
-the same time remove ipi_type from the sbi_scratch struct and use a
-fixed offset to access it.
-
-This structure fits in behind the sbi_scratch structure.
-
-This fixes https://github.com/riscv/opensbi/issues/81
-
-Upstream-Status: Backport [https://github.com/riscv/opensbi/commit/508a27204cbbca0a9430236e56681e5e0d343fb9]
-Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
----
- firmware/fw_base.S        |  1 -
- include/sbi/sbi_scratch.h | 23 ++++++++++++++++-------
- lib/sbi_ipi.c             |  8 +++++---
- 3 files changed, 21 insertions(+), 11 deletions(-)
-
-diff --git a/firmware/fw_base.S b/firmware/fw_base.S
-index cf2c6a0..69cfc90 100644
---- a/firmware/fw_base.S
-+++ b/firmware/fw_base.S
-@@ -183,7 +183,6 @@ _start_warm:
- 	REG_S	a4, SBI_SCRATCH_PLATFORM_ADDR_OFFSET(tp)
- 	la	a4, _hartid_to_scratch
- 	REG_S	a4, SBI_SCRATCH_HARTID_TO_SCRATCH_OFFSET(tp)
--	REG_S	zero, SBI_SCRATCH_IPI_TYPE_OFFSET(tp)
- 	REG_S	zero, SBI_SCRATCH_TMP0_OFFSET(tp)
- 
- 	/* Setup stack */
-diff --git a/include/sbi/sbi_scratch.h b/include/sbi/sbi_scratch.h
-index 8389ef3..70ab384 100644
---- a/include/sbi/sbi_scratch.h
-+++ b/include/sbi/sbi_scratch.h
-@@ -28,17 +28,24 @@
- #define SBI_SCRATCH_PLATFORM_ADDR_OFFSET	(6 * __SIZEOF_POINTER__)
- /** Offset of hartid_to_scratch member in sbi_scratch */
- #define SBI_SCRATCH_HARTID_TO_SCRATCH_OFFSET	(7 * __SIZEOF_POINTER__)
--/** Offset of ipi_type member in sbi_scratch */
--#define SBI_SCRATCH_IPI_TYPE_OFFSET		(8 * __SIZEOF_POINTER__)
- /** Offset of tmp0 member in sbi_scratch */
--#define SBI_SCRATCH_TMP0_OFFSET			(9 * __SIZEOF_POINTER__)
--/** Maximum size of sbi_scratch */
--#define SBI_SCRATCH_SIZE			256
-+#define SBI_SCRATCH_TMP0_OFFSET			(8 * __SIZEOF_POINTER__)
-+
-+/** sbi_ipi_data is located behind sbi_scratch. This struct is not packed. */
-+/** Offset of ipi_type in sbi_ipi_data */
-+#define SBI_IPI_DATA_IPI_TYPE_OFFSET		(15 * __SIZEOF_POINTER__)
-+
-+/** Maximum size of sbi_scratch and sbi_ipi_data */
-+#define SBI_SCRATCH_SIZE			(32 * __SIZEOF_POINTER__)
- 
- #ifndef __ASSEMBLY__
- 
- #include <sbi/sbi_types.h>
- 
-+struct sbi_ipi_data {
-+	unsigned long ipi_type;
-+};
-+
- /** Representation of per-HART scratch space */
- struct sbi_scratch {
- 	/** Start (or base) address of firmware linked to OpenSBI library */
-@@ -57,8 +64,6 @@ struct sbi_scratch {
- 	unsigned long platform_addr;
- 	/** Address of HART ID to sbi_scratch conversion function */
- 	unsigned long hartid_to_scratch;
--	/** IPI type (or flags) */
--	unsigned long ipi_type;
- 	/** Temporary storage */
- 	unsigned long tmp0;
- } __packed;
-@@ -71,6 +76,10 @@ struct sbi_scratch {
- #define sbi_scratch_thishart_arg1_ptr()	\
- ((void *)(sbi_scratch_thishart_ptr()->next_arg1))
- 
-+/** Get pointer to sbi_ipi_data from sbi_scratch */
-+#define sbi_ipi_data_ptr(scratch)      \
-+((struct sbi_ipi_data *)(void*)scratch + SBI_IPI_DATA_IPI_TYPE_OFFSET)
-+
- #endif
- 
- #endif
-diff --git a/lib/sbi_ipi.c b/lib/sbi_ipi.c
-index 0e371d7..e0f2a19 100644
---- a/lib/sbi_ipi.c
-+++ b/lib/sbi_ipi.c
-@@ -31,7 +31,7 @@ static int sbi_ipi_send(struct sbi_scratch *scratch, u32 hartid, u32 event)
- 	 * trigger the interrupt
- 	 */
- 	remote_scratch = sbi_hart_id_to_scratch(scratch, hartid);
--	atomic_raw_set_bit(event, &remote_scratch->ipi_type);
-+	atomic_raw_set_bit(event, &sbi_ipi_data_ptr(remote_scratch)->ipi_type);
- 	mb();
- 	sbi_platform_ipi_send(plat, hartid);
- 	if (event != SBI_IPI_EVENT_SOFT)
-@@ -80,7 +80,7 @@ void sbi_ipi_process(struct sbi_scratch *scratch)
- 	sbi_platform_ipi_clear(plat, hartid);
- 
- 	do {
--		ipi_type = scratch->ipi_type;
-+		ipi_type = sbi_ipi_data_ptr(scratch)->ipi_type;
- 		rmb();
- 		ipi_event = __ffs(ipi_type);
- 		switch (ipi_event) {
-@@ -97,12 +97,14 @@ void sbi_ipi_process(struct sbi_scratch *scratch)
- 			sbi_hart_hang();
- 			break;
- 		};
--		ipi_type = atomic_raw_clear_bit(ipi_event, &scratch->ipi_type);
-+		ipi_type = atomic_raw_clear_bit(ipi_event, &sbi_ipi_data_ptr(scratch)->ipi_type);
- 	} while(ipi_type > 0);
- }
- 
- int sbi_ipi_init(struct sbi_scratch *scratch, bool cold_boot)
- {
-+	sbi_ipi_data_ptr(scratch)->ipi_type = 0x00;
-+
- 	/* Enable software interrupts */
- 	csr_set(CSR_MIE, MIP_MSIP);
- 
--- 
-2.22.0
-
diff --git a/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc
index 7828599..b9714a7 100644
--- a/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc
+++ b/poky/meta/recipes-bsp/opensbi/opensbi-payloads.inc
@@ -5,10 +5,7 @@
     if sbi_payload is None:
         return ""
 
-    if d.getVar('RISCV_SBI_PAYLOAD'):
-        return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
-
-    return ""
+    return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
 
 def riscv_get_extra_oemake_fdt(d):
     sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
@@ -17,14 +14,11 @@
     if sbi_fdt_payload is None:
         return ""
 
-    if d.getVar('RISCV_SBI_PAYLOAD'):
-        # This is internal to openSBI, not a full path
-        return "FW_PAYLOAD_FDT=" + sbi_fdt_payload
-
-    return ""
+    return "FW_PAYLOAD_FDT_PATH=" + deploy_dir + "/" + sbi_fdt_payload
 
 def riscv_get_do_compile_depends(d):
     sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
+    sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
 
     if sbi_payload is None:
         return ""
@@ -32,6 +26,14 @@
     if 'linux' in sbi_payload or 'Image' in sbi_payload:
         return "virtual/kernel:do_deploy"
     if 'u-boot.bin' in sbi_payload:
-        return "virtual/bootloader:do_deploy"
+        # If we want U-Boot and a FDT then we need to depend on U-Boot and
+        # the kernel
+        if sbi_fdt_payload is not None:
+            return "virtual/bootloader:do_deploy virtual/kernel:do_deploy"
+        else:
+            return "virtual/bootloader:do_deploy"
+    # If we want a custom FDT then we need to depend on the kernel
+    if sbi_fdt_payload is not None:
+        return "virtual/kernel:do_deploy"
 
     return ""
diff --git a/poky/meta/recipes-bsp/opensbi/opensbi_0.3.bb b/poky/meta/recipes-bsp/opensbi/opensbi_0.4.bb
similarity index 85%
rename from poky/meta/recipes-bsp/opensbi/opensbi_0.3.bb
rename to poky/meta/recipes-bsp/opensbi/opensbi_0.4.bb
index 2b4fb97..068ae76 100644
--- a/poky/meta/recipes-bsp/opensbi/opensbi_0.3.bb
+++ b/poky/meta/recipes-bsp/opensbi/opensbi_0.4.bb
@@ -1,17 +1,16 @@
 SUMMARY = "RISC-V Open Source Supervisor Binary Interface (OpenSBI)"
 DESCRIPTION = "OpenSBI aims to provide an open-source and extensible implementation of the RISC-V SBI specification for a platform specific firmware (M-mode) and a general purpose OS, hypervisor or bootloader (S-mode or HS-mode). OpenSBI implementation can be easily extended by RISC-V platform or System-on-Chip vendors to fit a particular hadware configuration."
 LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=c36118b4f615f9da37635f2a7ac8ccaf"
+LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5"
 DEPENDS += "dtc-native"
 
 require opensbi-payloads.inc
 
 inherit autotools-brokensep
 
-SRCREV = "ca20ac0cd4c099006d4eea4d9ac7bd7b58e2ae0f"
+SRCREV = "ce228ee0919deb9957192d723eecc8aaae2697c6"
 SRC_URI = "git://github.com/riscv/opensbi.git \
            file://0001-Makefile-Don-t-specify-mabi-or-march.patch \
-           file://0002-lib-Create-a-sbi_ipi_data-structure.patch \
           "
 
 S = "${WORKDIR}/git"
@@ -32,18 +31,22 @@
 	rm -r ${D}/include
 	rm -r ${D}/platform/${RISCV_SBI_PLAT}/lib
 	rm -r ${D}/platform/${RISCV_SBI_PLAT}/firmware/payloads
+	rm -r ${D}/lib
 }
 
 do_deploy () {
 	install -d ${DEPLOY_DIR_IMAGE}
 	install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOY_DIR_IMAGE}/
 	install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOY_DIR_IMAGE}/
+	install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOY_DIR_IMAGE}/
 }
 
 addtask deploy after do_install
 
 FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
 FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
+FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
+
 
 COMPATIBLE_HOST = "(riscv64|riscv32).*"
 INHIBIT_PACKAGE_STRIP = "1"
diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc
index a0212e1..ad043db 100644
--- a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -8,7 +8,7 @@
 
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "3c99166441bf3ea325af2da83cfe65430b49c066"
+SRCREV = "e5aee22e4be75e75a854ab64503fc80598bc2004"
 
 SRC_URI = "git://git.denx.de/u-boot.git"
 
diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.04.bb b/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb
similarity index 100%
rename from poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.04.bb
rename to poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb
diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.04.bb b/poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.07.bb
similarity index 100%
rename from poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.04.bb
rename to poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.07.bb
diff --git a/poky/meta/recipes-bsp/u-boot/u-boot_2019.04.bb b/poky/meta/recipes-bsp/u-boot/u-boot_2019.07.bb
similarity index 100%
rename from poky/meta/recipes-bsp/u-boot/u-boot_2019.04.bb
rename to poky/meta/recipes-bsp/u-boot/u-boot_2019.07.bb
diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5.inc b/poky/meta/recipes-connectivity/bluez5/bluez5.inc
index 8f32163..28aaeea 100644
--- a/poky/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/poky/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -6,7 +6,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
                     file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
-DEPENDS = "dbus-glib glib-2.0"
+DEPENDS = "dbus glib-2.0"
 PROVIDES += "bluez-hcidump"
 RPROVIDES_${PN} += "bluez-hcidump"
 
diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5_5.50.bb b/poky/meta/recipes-connectivity/bluez5/bluez5_5.50.bb
index 6627143..4e443e5 100644
--- a/poky/meta/recipes-connectivity/bluez5/bluez5_5.50.bb
+++ b/poky/meta/recipes-connectivity/bluez5/bluez5_5.50.bb
@@ -1,7 +1,5 @@
 require bluez5.inc
 
-REQUIRED_DISTRO_FEATURES = "bluez5"
-
 SRC_URI[md5sum] = "8e35c67c81a55d3ad4c9f22280dae178"
 SRC_URI[sha256sum] = "5ffcaae18bbb6155f1591be8c24898dc12f062075a40b538b745bfd477481911"
 
diff --git a/poky/meta/recipes-connectivity/connman/connman.inc b/poky/meta/recipes-connectivity/connman/connman.inc
index ae67079..ee00479 100644
--- a/poky/meta/recipes-connectivity/connman/connman.inc
+++ b/poky/meta/recipes-connectivity/connman/connman.inc
@@ -13,7 +13,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36"
 
-inherit autotools pkgconfig systemd update-rc.d bluetooth update-alternatives
+inherit autotools pkgconfig systemd update-rc.d update-alternatives
 
 DEPENDS  = "dbus glib-2.0 ppp readline"
 
@@ -42,7 +42,7 @@
 
 PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''"
 PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant"
-PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}, ${BLUEZ}"
+PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5"
 PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
 PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
 PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
diff --git a/poky/meta/recipes-connectivity/iproute2/iproute2_5.1.0.bb b/poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb
similarity index 68%
rename from poky/meta/recipes-connectivity/iproute2/iproute2_5.1.0.bb
rename to poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb
index 6854a13..8ef529d 100644
--- a/poky/meta/recipes-connectivity/iproute2/iproute2_5.1.0.bb
+++ b/poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb
@@ -5,8 +5,8 @@
            file://0001-libc-compat.h-add-musl-workaround.patch \
           "
 
-SRC_URI[md5sum] = "a2b8349abf4ae00e92155fda22de4d5e"
-SRC_URI[sha256sum] = "dc5a980873eabf6b00c0be976b6e5562b1400d47d1d07d2ac35d5e5acbcf7bcf"
+SRC_URI[md5sum] = "0cb2736e7bc2f56254a363d3d23703b7"
+SRC_URI[sha256sum] = "a5b95dec26353fc71dba9bb403e9343fad2a06bd69fb154a22a2aa2914f74da8"
 
 # CFLAGS are computed in Makefile and reference CCOPTS
 #
diff --git a/poky/meta/recipes-connectivity/libpcap/libpcap_1.9.0.bb b/poky/meta/recipes-connectivity/libpcap/libpcap_1.9.0.bb
index 7836156..77bc31a 100644
--- a/poky/meta/recipes-connectivity/libpcap/libpcap_1.9.0.bb
+++ b/poky/meta/recipes-connectivity/libpcap/libpcap_1.9.0.bb
@@ -16,7 +16,7 @@
 SRC_URI[md5sum] = "dffd65cb14406ab9841f421732eb0f33"
 SRC_URI[sha256sum] = "2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019"
 
-inherit autotools binconfig-disabled pkgconfig bluetooth
+inherit autotools binconfig-disabled pkgconfig
 
 BINCONFIG = "${bindir}/pcap-config"
 
@@ -29,7 +29,7 @@
                  "
 EXTRA_AUTORECONF += "--exclude=aclocal"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
 "
 PACKAGECONFIG[bluez5] = "--enable-bluetooth,--disable-bluetooth,bluez5"
diff --git a/poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb b/poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
index 77adceb..0b0bbab 100644
--- a/poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
+++ b/poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
@@ -3,11 +3,13 @@
 SECTION = "network"
 LICENSE = "PD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
-SRCREV = "c7def60ba50d9cc30a90f69f89d7e82243501e86"
-PV = "20190116"
+SRCREV = "22b49d86fb7aded2c195a9d49e5924da696b3228"
+PV = "20190618"
 PE = "1"
 
 SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https"
 S = "${WORKDIR}/git"
 
 inherit autotools
+
+DEPENDS += "libxslt-native"
diff --git a/poky/meta/recipes-connectivity/neard/neard_0.16.bb b/poky/meta/recipes-connectivity/neard/neard_0.16.bb
index cc6af4e..7c124a3 100644
--- a/poky/meta/recipes-connectivity/neard/neard_0.16.bb
+++ b/poky/meta/recipes-connectivity/neard/neard_0.16.bb
@@ -18,7 +18,7 @@
  file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
  "
 
-inherit autotools pkgconfig systemd update-rc.d bluetooth
+inherit autotools pkgconfig systemd update-rc.d
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 
@@ -40,7 +40,7 @@
 
 # Bluez & Wifi are not mandatory except for handover
 RRECOMMENDS_${PN} = "\
-                     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
                      ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
                     "
 
diff --git a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
index 27ea58d..3c3a802 100644
--- a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
+++ b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
@@ -1,6 +1,7 @@
 [Unit]
 Description=NFS Mount Daemon
 DefaultDependencies=no
+After=rpcbind.socket
 Requires=proc-fs-nfsd.mount
 After=proc-fs-nfsd.mount
 After=network.target local-fs.target
diff --git a/poky/meta/recipes-connectivity/ofono/ofono.inc b/poky/meta/recipes-connectivity/ofono/ofono.inc
index e1185c6..03d0fd5 100644
--- a/poky/meta/recipes-connectivity/ofono/ofono.inc
+++ b/poky/meta/recipes-connectivity/ofono/ofono.inc
@@ -5,7 +5,7 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
                     file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee"
 
-inherit autotools pkgconfig update-rc.d systemd bluetooth gobject-introspection-data
+inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data
 
 DEPENDS  = "dbus glib-2.0 udev mobile-broadband-provider-info ell"
 
@@ -17,7 +17,7 @@
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
     "
 PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
-PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}"
+PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5"
 
 EXTRA_OECONF += "--enable-test --enable-external-ell"
 
diff --git a/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch b/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch
new file mode 100644
index 0000000..6b4789f
--- /dev/null
+++ b/poky/meta/recipes-connectivity/openssl/openssl/0001-Fix-broken-change-from-b3d113e.patch
@@ -0,0 +1,35 @@
+From 711a161f03ef9ed7cd149a22bf1203700c103e96 Mon Sep 17 00:00:00 2001
+From: Pauli <paul.dale@oracle.com>
+Date: Fri, 29 Mar 2019 09:24:07 +1000
+Subject: [PATCH] Fix broken change from b3d113e.
+
+Reviewed-by: Tim Hudson <tjh@openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/8606)
+
+Running valgrind against code using Openssl v1.1.1c reports a large number of
+uninitialized memory errors. This fix from upstream solves this problem.
+
+Upstream-Status: Backport [https://github.com/openssl/openssl/commit/711a161f03ef9ed7cd149a22bf1203700c103e96]
+Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
+---
+ crypto/rand/rand_lib.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
+index 23abbde156..a298b7515b 100644
+--- a/crypto/rand/rand_lib.c
++++ b/crypto/rand/rand_lib.c
+@@ -235,8 +235,9 @@ size_t rand_drbg_get_nonce(RAND_DRBG *drbg,
+     struct {
+         void * instance;
+         int count;
+-    } data = { NULL, 0 };
++    } data;
+ 
++    memset(&data, 0, sizeof(data));
+     pool = rand_pool_new(0, min_len, max_len);
+     if (pool == NULL)
+         return 0;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb
index 0117407..75159ac 100644
--- a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb
+++ b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1c.bb
@@ -17,6 +17,7 @@
            file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \
            file://afalg.patch \
            file://0001-Fix-build-error-for-aarch64-big-endian.patch \
+           file://0001-Fix-broken-change-from-b3d113e.patch \
            "
 
 SRC_URI_append_class-nativesdk = " \
@@ -26,7 +27,8 @@
 SRC_URI[md5sum] = "15e21da6efe8aa0e0768ffd8cd37a5f6"
 SRC_URI[sha256sum] = "f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90"
 
-inherit lib_package multilib_header ptest
+inherit lib_package multilib_header multilib_script ptest
+MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG_class-native = ""
@@ -200,3 +202,5 @@
 RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash"
 
 BBCLASSEXTEND = "native nativesdk"
+
+CVE_PRODUCT = "openssl:openssl"
diff --git a/poky/meta/recipes-core/busybox/busybox-inittab_1.30.1.bb b/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb
similarity index 100%
rename from poky/meta/recipes-core/busybox/busybox-inittab_1.30.1.bb
rename to poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb
diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc
index 174ce5a..49165d7 100644
--- a/poky/meta/recipes-core/busybox/busybox.inc
+++ b/poky/meta/recipes-core/busybox/busybox.inc
@@ -392,34 +392,40 @@
         set_alternative_vars("${sysconfdir}/busybox.links.suid", "${base_bindir}/busybox.suid")
 }
 
-pkg_postinst_${PN} () {
-	# This part of code is dedicated to the on target upgrade problem.
-	# It's known that if we don't make appropriate symlinks before update-alternatives calls,
-	# there will be errors indicating missing commands such as 'sed'.
-	# These symlinks will later be updated by update-alternatives calls.
-	test -n 2 > /dev/null || alias test='busybox test'
-	if test "x$D" = "x"; then
-		# Remove busybox.nosuid if it's a symlink, because this situation indicates
-		# that we're installing or upgrading to a one-binary busybox.
-		if test -h ${base_bindir}/busybox.nosuid; then
-			rm -f ${base_bindir}/busybox.nosuid
-		fi
-		for suffix in "" ".nosuid" ".suid"; do
-			if test -e ${sysconfdir}/busybox.links$suffix; then
-				while read link; do
-					if test ! -e "$link"; then
-						# we can use busybox here because even if we are using splitted busybox
-						# we've made a symlink from /bin/busybox to /bin/busybox.nosuid.
-						busybox rm -f $link
-						busybox ln -s "${base_bindir}/busybox$suffix" $link
-					fi
-				done < ${sysconfdir}/busybox.links$suffix
-			fi
-		done
-	fi
-	if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
-		grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
-	fi
+# This part of code is dedicated to the on target upgrade problem.  It's known
+# that if we don't make appropriate symlinks before update-alternatives calls,
+# there will be errors indicating missing commands such as 'sed'.
+# These symlinks will later be updated by update-alternatives calls.
+# The update-alternatives.bbclass' postinst script runs firstly before other
+# postinst, but this part of code needs run firstly, so add this funtion.
+python populate_packages_updatealternatives_append() {
+    postinst = """
+test -n 2 > /dev/null || alias test='busybox test'
+if test "x$D" = "x"; then
+    # Remove busybox.nosuid if it's a symlink, because this situation indicates
+    # that we're installing or upgrading to a one-binary busybox.
+    if test -h ${base_bindir}/busybox.nosuid; then
+        rm -f ${base_bindir}/busybox.nosuid
+    fi
+    for suffix in "" ".nosuid" ".suid"; do
+        if test -e ${sysconfdir}/busybox.links$suffix; then
+            while read link; do
+                if test ! -e "$link"; then
+                    # we can use busybox here because even if we are using splitted busybox
+                    # we've made a symlink from /bin/busybox to /bin/busybox.nosuid.
+                    busybox rm -f $link
+                    busybox ln -s "${base_bindir}/busybox$suffix" $link
+                fi
+            done < ${sysconfdir}/busybox.links$suffix
+        fi
+    done
+fi
+if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then
+    grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
+fi
+
+"""
+    d.prependVar('pkg_postinst_%s' % pkg, postinst)
 }
 
 pkg_prerm_${PN} () {
diff --git a/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch b/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch
deleted file mode 100644
index d22db4a..0000000
--- a/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a4e03fbb4d82f91069d96005405f89c45b8fd157 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Wed, 17 Apr 2019 09:24:37 +0800
-Subject: [PATCH] dc.tests: fix two test case to also depend on DC_BIG
-
-Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2019-April/087205.html]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- testsuite/dc.tests | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/testsuite/dc.tests b/testsuite/dc.tests
-index 1708a48..8c3af41 100755
---- a/testsuite/dc.tests
-+++ b/testsuite/dc.tests
-@@ -41,6 +41,9 @@ testing "dc complex without spaces (multiple args)" \
- 	"16\n" \
- 	"" ""
- 
-+optional FEATURE_DC_BIG
-+# All tests below depend on FEATURE_DC_BIG
-+
- testing "dc read" \
- 	"dc -finput" \
- 	"2\n9\n1\n" \
-@@ -51,9 +54,6 @@ testing "dc read string" \
- 	"2\nstr\n1\n" \
- 	"1?2\nf" "[str]\n"
- 
--optional FEATURE_DC_BIG
--# All tests below depend on FEATURE_DC_BIG
--
- testing "dc '>a' (conditional execute string) 1" \
- 	"dc" \
- 	"1\n9\n" \
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
index 76daaf1..2a0a40c 100644
--- a/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
+++ b/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch
@@ -31,10 +31,10 @@
  networking/udhcp/dhcpc.c                       | 29 ++++++++++++++++------
  1 file changed, 21 insertions(+), 8 deletions(-)
 
-Index: busybox-1.29.1/networking/udhcp/dhcpc.c
+Index: busybox-1.31.0/networking/udhcp/dhcpc.c
 ===================================================================
---- busybox-1.29.1.orig/networking/udhcp/dhcpc.c
-+++ busybox-1.29.1/networking/udhcp/dhcpc.c
+--- busybox-1.31.0.orig/networking/udhcp/dhcpc.c
++++ busybox-1.31.0/networking/udhcp/dhcpc.c
 @@ -48,6 +48,8 @@
  };
  #endif
@@ -42,21 +42,21 @@
 +/* option whether to down the interface when reconfiguring */
 +static int allow_deconfig = 1;
  
- /* "struct client_config_t client_config" is in bb_common_bufsiz1 */
+ /* "struct client_data_t client_data" is in bb_common_bufsiz1 */
  
-@@ -103,8 +105,9 @@
+@@ -103,8 +105,10 @@
  	OPT_x = 1 << 18,
  	OPT_f = 1 << 19,
  	OPT_B = 1 << 20,
 +	OPT_D = 1 << 21,
  /* The rest has variable bit positions, need to be clever */
--	OPTBIT_B = 20,
+ 	OPTBIT_B = 20,
 +	OPTBIT_D = 21,
  	USE_FOR_MMU(             OPTBIT_b,)
  	IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
  	IF_FEATURE_UDHCP_PORT(   OPTBIT_P,)
-@@ -1116,7 +1119,8 @@
- 		state = RENEW_REQUESTED;
+@@ -1124,7 +1128,8 @@
+ 		client_data.state = RENEW_REQUESTED;
  		break;
  	case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
 -		udhcp_run_script(NULL, "deconfig");
@@ -65,7 +65,7 @@
  	case REQUESTING:
  	case RELEASED:
  		change_listen_mode(LISTEN_RAW);
-@@ -1152,7 +1156,8 @@
+@@ -1160,7 +1165,8 @@
   * Users requested to be notified in all cases, even if not in one
   * of the states above.
   */
@@ -74,8 +74,8 @@
 +		udhcp_run_script(NULL, "deconfig");
  
  	change_listen_mode(LISTEN_NONE);
- 	state = RELEASED;
-@@ -1265,7 +1270,7 @@
+ 	client_data.state = RELEASED;
+@@ -1278,7 +1284,7 @@
  	/* Parse command line */
  	opt = getopt32long(argv, "^"
  		/* O,x: list; -T,-t,-A take numeric param */
@@ -84,7 +84,7 @@
  		USE_FOR_MMU("b")
  		IF_FEATURE_UDHCPC_ARPING("a::")
  		IF_FEATURE_UDHCP_PORT("P:")
-@@ -1376,6 +1381,10 @@
+@@ -1389,6 +1395,10 @@
  		logmode |= LOGMODE_SYSLOG;
  	}
  
@@ -92,52 +92,52 @@
 +		allow_deconfig = 0;
 +	}
 +
- 	/* Make sure fd 0,1,2 are open */
- 	bb_sanitize_stdio();
  	/* Create pidfile */
-@@ -1388,7 +1397,8 @@
+ 	write_pidfile(client_data.pidfile);
+ 	/* Goes to stdout (unless NOMMU) and possibly syslog */
+@@ -1397,7 +1407,8 @@
  	srand(monotonic_us());
  
- 	state = INIT_SELECTING;
+ 	client_data.state = INIT_SELECTING;
 -	udhcp_run_script(NULL, "deconfig");
 +	if (allow_deconfig)
 +		udhcp_run_script(NULL, "deconfig");
  	change_listen_mode(LISTEN_RAW);
  	packet_num = 0;
  	timeout = 0;
-@@ -1555,7 +1565,8 @@
+@@ -1570,7 +1581,8 @@
  				}
  				/* Timed out, enter init state */
- 				bb_error_msg("lease lost, entering init state");
+ 				bb_info_msg("lease lost, entering init state");
 -				udhcp_run_script(NULL, "deconfig");
 +				if (allow_deconfig)
 +					udhcp_run_script(NULL, "deconfig");
- 				state = INIT_SELECTING;
- 				client_config.first_secs = 0; /* make secs field count from 0 */
+ 				client_data.state = INIT_SELECTING;
+ 				client_data.first_secs = 0; /* make secs field count from 0 */
  				/*timeout = 0; - already is */
-@@ -1748,8 +1759,10 @@
+@@ -1762,8 +1774,10 @@
  							"(got ARP reply), declining");
  						send_decline(/*xid,*/ server_addr, packet.yiaddr);
  
--						if (state != REQUESTING)
+-						if (client_data.state != REQUESTING)
 -							udhcp_run_script(NULL, "deconfig");
-+						if (state != REQUESTING) {
++						if (client_data.state != REQUESTING) {
 +							if (allow_deconfig)
 +								udhcp_run_script(NULL, "deconfig");
 +						}
  						change_listen_mode(LISTEN_RAW);
- 						state = INIT_SELECTING;
- 						client_config.first_secs = 0; /* make secs field count from 0 */
-@@ -1818,8 +1831,10 @@
+ 						client_data.state = INIT_SELECTING;
+ 						client_data.first_secs = 0; /* make secs field count from 0 */
+@@ -1832,8 +1846,10 @@
  				/* return to init state */
- 				bb_error_msg("received %s", "DHCP NAK");
+ 				bb_info_msg("received %s", "DHCP NAK");
  				udhcp_run_script(&packet, "nak");
--				if (state != REQUESTING)
+-				if (client_data.state != REQUESTING)
 -					udhcp_run_script(NULL, "deconfig");
-+				if (state != REQUESTING) {
++				if (client_data.state != REQUESTING) {
 +					if (allow_deconfig)
 +						udhcp_run_script(NULL, "deconfig");
 +				}
  				change_listen_mode(LISTEN_RAW);
  				sleep(3); /* avoid excessive network traffic */
- 				state = INIT_SELECTING;
+ 				client_data.state = INIT_SELECTING;
diff --git a/poky/meta/recipes-core/busybox/busybox/unicode.cfg b/poky/meta/recipes-core/busybox/busybox/unicode.cfg
new file mode 100644
index 0000000..ecb5a64
--- /dev/null
+++ b/poky/meta/recipes-core/busybox/busybox/unicode.cfg
@@ -0,0 +1,10 @@
+CONFIG_UNICODE_SUPPORT=y
+# CONFIG_UNICODE_USING_LOCALE is not set
+CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y
+CONFIG_SUBST_WCHAR=63
+CONFIG_LAST_SUPPORTED_WCHAR=767
+CONFIG_UNICODE_COMBINING_WCHARS=y
+CONFIG_UNICODE_WIDE_WCHARS=y
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
diff --git a/poky/meta/recipes-core/busybox/busybox_1.30.1.bb b/poky/meta/recipes-core/busybox/busybox_1.31.0.bb
similarity index 88%
rename from poky/meta/recipes-core/busybox/busybox_1.30.1.bb
rename to poky/meta/recipes-core/busybox/busybox_1.31.0.bb
index ba76755..c1da372 100644
--- a/poky/meta/recipes-core/busybox/busybox_1.30.1.bb
+++ b/poky/meta/recipes-core/busybox/busybox_1.31.0.bb
@@ -37,6 +37,7 @@
            ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
            ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \
            file://syslog.cfg \
+           file://unicode.cfg \
            file://inittab \
            file://rcS \
            file://rcK \
@@ -44,9 +45,8 @@
            file://0001-testsuite-check-uudecode-before-using-it.patch \
            file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \
            file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \
-           file://0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-SRC_URI[tarball.md5sum] = "4f72fc6abd736d5f4741fc4a2485547a"
-SRC_URI[tarball.sha256sum] = "3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc"
+SRC_URI[tarball.md5sum] = "cdba5d4458f944ceec5cdcf7c4914b69"
+SRC_URI[tarball.sha256sum] = "0e4925392fd9f3743cc517e031b68b012b24a63b0cf6c1ff03cce7bb3846cc99"
diff --git a/poky/meta/recipes-core/busybox/files/syslog b/poky/meta/recipes-core/busybox/files/syslog
index 89c4d12..2208613 100644
--- a/poky/meta/recipes-core/busybox/files/syslog
+++ b/poky/meta/recipes-core/busybox/files/syslog
@@ -51,6 +51,22 @@
 	SYSLOG_ARGS="-C"
 fi
 
+waitpid ()
+{
+  pid=$1
+  # Give pid a chance to exit before we restart with a 5s timeout in 1s intervals
+  if [ -z "$pid" ]; then
+    return
+  fi
+  timeout=5;
+  while [ $timeout -gt 0 ]
+  do
+    timeout=$(( $timeout-1 ))
+    kill -0 $pid 2> /dev/null || break
+    sleep 1
+  done
+}
+
 case "$1" in
   start)
 	echo -n "Starting syslogd/klogd: "
@@ -65,7 +81,11 @@
 	echo "done"
 	;;
   restart)
-  	$0 stop
+	pid1=`pidof syslogd`
+	pid2=`pidof klogd`
+	$0 stop
+	waitpid $pid1
+	waitpid $pid2
 	$0 start
 	;;
   *)
diff --git a/poky/meta/recipes-core/expat/expat/autotools.patch b/poky/meta/recipes-core/expat/expat/autotools.patch
deleted file mode 100644
index 104717e..0000000
--- a/poky/meta/recipes-core/expat/expat/autotools.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Avoid using expat's m4 files
-
-Upstream-Status: Inappropriate [Other]
-Workaround specific to our build system.
-
-Signed-off-by: Kevin Tian <kevin.tian@intel.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Updated to apply over expat 2.1.0
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-
-Index: expat-2.2.5/configure.ac
-===================================================================
---- expat-2.2.5.orig/configure.ac
-+++ expat-2.2.5/configure.ac
-@@ -53,8 +53,6 @@ LIBAGE=6       # CMakeLists.txt!
- CPPFLAGS="${CPPFLAGS} -DHAVE_EXPAT_CONFIG_H"
- AC_CONFIG_HEADER(expat_config.h)
- 
--sinclude(conftools/ac_c_bigendian_cross.m4)
--
- AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
- 
diff --git a/poky/meta/recipes-core/expat/expat_2.2.6.bb b/poky/meta/recipes-core/expat/expat_2.2.7.bb
similarity index 78%
rename from poky/meta/recipes-core/expat/expat_2.2.6.bb
rename to poky/meta/recipes-core/expat/expat_2.2.7.bb
index c9e6081..f213bc3 100644
--- a/poky/meta/recipes-core/expat/expat_2.2.6.bb
+++ b/poky/meta/recipes-core/expat/expat_2.2.7.bb
@@ -7,12 +7,11 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=5b8620d98e49772d95fc1d291c26aa79"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
-           file://autotools.patch \
            file://libtool-tag.patch \
 	  "
 
-SRC_URI[md5sum] = "ca047ae951b40020ac831c28859161b2"
-SRC_URI[sha256sum] = "17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2"
+SRC_URI[md5sum] = "72f36b87cdb478aba1e78473393766aa"
+SRC_URI[sha256sum] = "cbc9102f4a31a8dafd42d642e9a3aa31e79a0aedaa1f6efd2795ebc83174ec18"
 
 inherit autotools lib_package
 
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-12450.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-12450.patch
deleted file mode 100644
index 59e4919..0000000
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/CVE-2019-12450.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-glib-2.0: fix CVE-2019-12450
-
-Not in release 2.61.1.
-
-CVE: CVE-2019-12450
-
-Upstream-Status: Backport [github.com/GNOME/glib.git]
-Signed-off-by: Joe Slater <joe.slater@windrivere.com>
----
-From d8f8f4d637ce43f8699ba94c9b7648beda0ca174 Mon Sep 17 00:00:00 2001
-From: Ondrej Holy <oholy@redhat.com>
-Date: Thu, 23 May 2019 10:41:53 +0200
-Subject: [PATCH] gfile: Limit access to files when copying
-
-file_copy_fallback creates new files with default permissions and
-set the correct permissions after the operation is finished. This
-might cause that the files can be accessible by more users during
-the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
-files to limit access to those files.
----
- gio/gfile.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/gio/gfile.c b/gio/gfile.c
-index 24b136d80..74b58047c 100644
---- a/gio/gfile.c
-+++ b/gio/gfile.c
-@@ -3284,12 +3284,12 @@ file_copy_fallback (GFile                  *source,
-         out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
-                                                                    FALSE, NULL,
-                                                                    flags & G_FILE_COPY_BACKUP,
--                                                                   G_FILE_CREATE_REPLACE_DESTINATION,
--                                                                   info,
-+                                                                   G_FILE_CREATE_REPLACE_DESTINATION |
-+                                                                   G_FILE_CREATE_PRIVATE, info,
-                                                                    cancellable, error);
-       else
-         out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
--                                                                  FALSE, 0, info,
-+                                                                  FALSE, G_FILE_CREATE_PRIVATE, info,
-                                                                   cancellable, error);
-     }
-   else if (flags & G_FILE_COPY_OVERWRITE)
-@@ -3297,12 +3297,13 @@ file_copy_fallback (GFile                  *source,
-       out = (GOutputStream *)g_file_replace (destination,
-                                              NULL,
-                                              flags & G_FILE_COPY_BACKUP,
--                                             G_FILE_CREATE_REPLACE_DESTINATION,
-+                                             G_FILE_CREATE_REPLACE_DESTINATION |
-+                                             G_FILE_CREATE_PRIVATE,
-                                              cancellable, error);
-     }
-   else
-     {
--      out = (GOutputStream *)g_file_create (destination, 0, cancellable, error);
-+      out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error);
-     }
- 
-   if (!out)
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index 2d698a6..380bee0 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -1,4 +1,4 @@
-From 17ca85e329bf39c004b73a02e94b597dac41ddfe Mon Sep 17 00:00:00 2001
+From 9c5d6e6ce5254a5f050bba2118a4a1807292c02a Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Fri, 11 Mar 2016 15:35:55 +0000
 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.3.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.5.bb
similarity index 84%
rename from poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.3.bb
rename to poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.5.bb
index 5942241..bcb1fdb 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.3.bb
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.60.5.bb
@@ -16,11 +16,10 @@
            file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
            file://0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch \
            file://0001-meson-do-a-build-time-check-for-strlcpy-before-attem.patch \
-           file://CVE-2019-12450.patch \
            "
 
 SRC_URI_append_class-native = " file://relocate-modules.patch"
 SRC_URI_append_class-target = " file://glib-meson.cross"
 
-SRC_URI[md5sum] = "112a850caa8d2c21e24d4c9844e8b1fe"
-SRC_URI[sha256sum] = "04ab0d560d45790d055f50db2d69974eab8b693a77390075462c56e652b760b9"
+SRC_URI[md5sum] = "7dced27cfa79419dc6cc82c02190c457"
+SRC_URI[sha256sum] = "3edf1df576ee82b2ecb8ba85c343644e48ee62e68290e71e6084b00d6ba2622e"
diff --git a/poky/meta/recipes-core/glibc/glibc-locale.inc b/poky/meta/recipes-core/glibc/glibc-locale.inc
index f033635..ef06389 100644
--- a/poky/meta/recipes-core/glibc/glibc-locale.inc
+++ b/poky/meta/recipes-core/glibc/glibc-locale.inc
@@ -87,6 +87,9 @@
 	if [ ${PACKAGE_NO_GCONV} -eq 0 ]; then
 		copy_locale_files ${libdir}/gconv 0755
 		copy_locale_files ${datadir}/i18n 0644
+	else
+		# Remove the libdir if it is empty when gconv is not copied
+		find ${D}${libdir} -type d -empty -delete
 	fi
 	copy_locale_files ${datadir}/locale 0644
 	install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED
@@ -95,3 +98,6 @@
 inherit libc-package
 
 BBCLASSEXTEND = "nativesdk"
+
+# Don't scan for CVEs as glibc will be scanned
+CVE_PRODUCT = ""
diff --git a/poky/meta/recipes-core/glibc/glibc-mtrace.inc b/poky/meta/recipes-core/glibc/glibc-mtrace.inc
index d703c14..ef9d60e 100644
--- a/poky/meta/recipes-core/glibc/glibc-mtrace.inc
+++ b/poky/meta/recipes-core/glibc/glibc-mtrace.inc
@@ -11,3 +11,6 @@
 	install -d -m 0755 ${D}${bindir}
 	install -m 0755 ${SRC}/mtrace ${D}${bindir}/
 }
+
+# Don't scan for CVEs as glibc will be scanned
+CVE_PRODUCT = ""
diff --git a/poky/meta/recipes-core/glibc/glibc-package.inc b/poky/meta/recipes-core/glibc/glibc-package.inc
index b7c64a0..b150a34 100644
--- a/poky/meta/recipes-core/glibc/glibc-package.inc
+++ b/poky/meta/recipes-core/glibc/glibc-package.inc
@@ -161,27 +161,34 @@
 
 do_stash_locale () {
 	dest=${LOCALESTASH}
-	install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
-	if [ "${base_libdir}" != "${libdir}" ]; then
-		cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
-	fi
+	install -d $dest${base_libdir} $dest${bindir} $dest${libdir} $dest${datadir}
+	# Hide away the locale data from the deployment
 	if [ -e ${D}${bindir}/localedef ]; then
-		mv -f ${D}${bindir}/localedef ${dest}${bindir}
+		cp -a ${D}${bindir}/localedef $dest${bindir}
 	fi
 	if [ -e ${D}${libdir}/gconv ]; then
-		mv -f ${D}${libdir}/gconv ${dest}${libdir}
-	fi
-	if [ -e ${D}${exec_prefix}/lib ]; then
-		cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
+		cp -a ${D}${libdir}/gconv $dest${libdir}
 	fi
 	if [ -e ${D}${datadir}/i18n ]; then
-		mv ${D}${datadir}/i18n ${dest}${datadir}
+		cp -a  ${D}${datadir}/i18n $dest${datadir}
 	fi
-	cp -fpPR ${D}${datadir}/* ${dest}${datadir}
-	rm -rf ${D}${datadir}/locale/
-	cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
 
-	target=${dest}/scripts
+	# Make a copy of all the libraries into the locale stash
+	cp -fpPR ${D}${libdir}/* $dest${libdir}
+	if [ "${base_libdir}" != "${libdir}" ]; then
+		cp -fpPR ${D}${base_libdir}/* $dest${base_libdir}
+	fi
+	if [ -e ${D}${exec_prefix}/lib ]; then
+		if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then
+			cp -fpPR ${D}${exec_prefix}/lib $dest${exec_prefix}
+		fi
+	fi
+
+	cp -fpPR ${D}${datadir}/* $dest${datadir}
+	rm -rf ${D}${datadir}/locale/
+	cp -fpPR ${WORKDIR}/SUPPORTED $dest
+
+	target=$dest/scripts
 	mkdir -p $target
 	for i in ${bashscripts}; do
 		if [ -f ${D}${bindir}/$i ]; then
@@ -203,30 +210,38 @@
 }
 addtask do_stash_locale_setscene
 
-do_poststash_install_cleanup () {
-	# Remove all files which do_stash_locale would remove (mv)
-	# since that task could have come from sstate and not get run.
+PACKAGE_PREPROCESS_FUNCS += "stash_locale_package_cleanup"
+SYSROOT_PREPROCESS_FUNCS += "stash_locale_sysroot_cleanup"
+stash_locale_cleanup () {
+	cleanupdir=$1
+	# Remove all files which do_stash_locale() copies
 	for i in ${bashscripts}; do
-	    rm -f ${D}${bindir}/$i
+		rm -f $cleanupdir${bindir}/$i
 	done
-	rm -f ${D}${bindir}/localedef
-	rm -rf ${D}${datadir}/i18n
-	rm -rf ${D}${libdir}/gconv
-	rm -rf ${D}/${localedir}
-	rm -rf ${D}${datadir}/locale
-	if [ "${libdir}" != "${exec_prefix}/lib" ]; then
-	    if [ -d "${D}${exec_prefix}/lib" ]; then
-		if [ -z "${ARCH_DYNAMIC_LOADER}" -o \
-		     ! -e "${D}${exec_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then
-			# error out if directory isn't empty
-			# this dir should only contain locale dir
-			# which has been deleted in the previous step
-			rmdir ${D}${exec_prefix}/lib
+	rm -f $cleanupdir${bindir}/localedef
+	rm -rf $cleanupdir${datadir}/i18n
+	rm -rf $cleanupdir${libdir}/gconv
+	rm -rf $cleanupdir${localedir}
+	rm -rf $cleanupdir${datadir}/locale
+	if [ "${libdir}" != "${exec_prefix}/lib" ] && [ "${root_prefix}/lib" != "${exec_prefix}/lib" ]; then
+		if [ -d "$cleanupdir${exec_prefix}/lib" ]; then
+			if [ -z "${ARCH_DYNAMIC_LOADER}" -o \
+			     ! -e "$cleanupdir${exec_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then
+				# error out if directory isn't empty
+				# this dir should only contain locale dir
+				# which has been deleted in the previous step
+				rmdir $cleanupdir${exec_prefix}/lib
+			fi
 		fi
-	    fi
 	fi
 }
-addtask do_poststash_install_cleanup after do_stash_locale do_install before do_populate_sysroot do_package
+
+stash_locale_sysroot_cleanup() {
+	stash_locale_cleanup ${SYSROOT_DESTDIR}
+}
+stash_locale_package_cleanup() {
+	stash_locale_cleanup ${PKGD}
+}
 
 pkg_postinst_nscd () {
 	if [ -z "$D" ]; then
diff --git a/poky/meta/recipes-core/glibc/glibc-scripts.inc b/poky/meta/recipes-core/glibc/glibc-scripts.inc
index 2a2b415..14a14e4 100644
--- a/poky/meta/recipes-core/glibc/glibc-scripts.inc
+++ b/poky/meta/recipes-core/glibc/glibc-scripts.inc
@@ -18,3 +18,6 @@
 # sotruss script requires sotruss-lib.so (given by libsotruss package), 
 # to produce trace of the library calls.
 RDEPENDS_${PN} += "libsotruss"
+
+# Don't scan for CVEs as glibc will be scanned
+CVE_PRODUCT = ""
diff --git a/poky/meta/recipes-core/glibc/glibc/CVE-2019-9169.patch b/poky/meta/recipes-core/glibc/glibc/CVE-2019-9169.patch
index bc40361..cf3744b 100644
--- a/poky/meta/recipes-core/glibc/glibc/CVE-2019-9169.patch
+++ b/poky/meta/recipes-core/glibc/glibc/CVE-2019-9169.patch
@@ -1,4 +1,5 @@
 CVE: CVE-2019-9169
+CVE: CVE-2018-20796
 Upstream-Status: Backport
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
diff --git a/poky/meta/recipes-core/glibc/glibc_2.29.bb b/poky/meta/recipes-core/glibc/glibc_2.29.bb
index 073d153..c6b2caa 100644
--- a/poky/meta/recipes-core/glibc/glibc_2.29.bb
+++ b/poky/meta/recipes-core/glibc/glibc_2.29.bb
@@ -121,7 +121,6 @@
 		echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\""
 		sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#"
 	fi
-
 }
 
 require glibc-package.inc
diff --git a/poky/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch b/poky/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch
new file mode 100644
index 0000000..7bf02ea
--- /dev/null
+++ b/poky/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch
@@ -0,0 +1,47 @@
+From ff714d6461569d69b253089110ec659e4ebec248 Mon Sep 17 00:00:00 2001
+From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+Date: Tue, 2 Jul 2019 20:10:42 +0200
+Subject: [PATCH] Define FNM_EXTMATCH for musl
+
+Fixes the following compilation errors with musl that does not have
+FNM_EXTMATCH defined:
+
+| main.c: In function 'expand_matches':
+| main.c:700:40: error: 'FNM_EXTMATCH' undeclared (first use in this
+function); did you mean 'FNM_NOMATCH'?
+|   700 |     if(fnmatch(pattern, ifa->ifa_name, FNM_EXTMATCH))
+|       |                                        ^~~~~~~~~~~~
+|       |                                        FNM_NOMATCH
+
+and
+
+| archlinux.c:40:28: error: 'FNM_EXTMATCH' undeclared (first use in this
+function); did you mean 'FNM_NOMATCH'?
+|    40 |   if(fnmatch(pattern, buf, FNM_EXTMATCH) == 0) {
+|       |                            ^~~~~~~~~~~~
+|       |                            FNM_NOMATCH
+
+Upstream-Status: Submitted [https://salsa.debian.org/debian/ifupdown/merge_requests/5]
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+---
+ archcommon.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/archcommon.h b/archcommon.h
+index fe99950..f257f9d 100644
+--- a/archcommon.h
++++ b/archcommon.h
+@@ -1,5 +1,9 @@
+ #include "header.h"
+ 
++#if !defined(FNM_EXTMATCH)
++#define FNM_EXTMATCH 0
++#endif
++
+ bool execable(const char *);
+ 
+ #define iface_is_link() (!_iface_has(ifd->real_iface, ":."))
+-- 
+2.17.1
+
diff --git a/poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch b/poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
index a24b8cd..d1c3d26 100644
--- a/poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
+++ b/poky/meta/recipes-core/ifupdown/files/defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch
@@ -1,4 +1,4 @@
-From 7af9db748974cb3a2c6ef8f9e03d7db1f9f8ee16 Mon Sep 17 00:00:00 2001
+From 40257d65b338b6e2ed9d89d6fa7c7b8701a4c311 Mon Sep 17 00:00:00 2001
 From: Paul Gortmaker <paul.gortmaker@windriver.com>
 Date: Wed, 6 Aug 2014 14:54:12 -0400
 Subject: [PATCH 1/2] defn2[c|man]: don't rely on dpkg-architecture to set arch
@@ -19,7 +19,7 @@
  2 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/defn2c.pl b/defn2c.pl
-index c449de2f3d1c..38845e374c76 100755
+index 8798dc2..f2551c7 100755
 --- a/defn2c.pl
 +++ b/defn2c.pl
 @@ -2,9 +2,9 @@
@@ -36,7 +36,7 @@
  # declarations
  my $address_family = "";
 diff --git a/defn2man.pl b/defn2man.pl
-index 6ddcfdd4fe68..c9c4dd046597 100755
+index 6ddcfdd..c9c4dd0 100755
 --- a/defn2man.pl
 +++ b/defn2man.pl
 @@ -2,9 +2,9 @@
@@ -53,5 +53,5 @@
  # declarations
  my $line;
 -- 
-1.9.1
+2.17.1
 
diff --git a/poky/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch b/poky/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch
index 37a61c9..5b0d51d 100644
--- a/poky/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch
+++ b/poky/meta/recipes-core/ifupdown/files/inet-6-.defn-fix-inverted-checks-for-loopback.patch
@@ -1,7 +1,7 @@
-From 7efe4676747e4e4a056b9bfb4e9424c8354e9996 Mon Sep 17 00:00:00 2001
+From 6fce99c9e42cbacde1855473b745ca1fded3fbf7 Mon Sep 17 00:00:00 2001
 From: "Maxin B. John" <maxin.john@intel.com>
 Date: Wed, 21 Dec 2016 15:32:07 +0200
-Subject: [PATCH] inet[6].defn: fix inverted checks for loopback
+Subject: [PATCH 2/2] inet[6].defn: fix inverted checks for loopback
 
 Compared to the hurd link.defn for loopback, we see these
 are inverted, meaning that you would only be able to configure
@@ -37,11 +37,11 @@
 Signed-off-by: Maxin B. John <maxin.john@intel.com>
 Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
 ---
- inet.defn | 140 +++++++++++++++++++++++++++++++-------------------------------
- 1 file changed, 70 insertions(+), 70 deletions(-)
+ inet.defn | 134 +++++++++++++++++++++++++++---------------------------
+ 1 file changed, 67 insertions(+), 67 deletions(-)
 
 diff --git a/inet.defn b/inet.defn
-index 75e6744..23c7756 100644
+index 182b56b..31067bc 100644
 --- a/inet.defn
 +++ b/inet.defn
 @@ -6,10 +6,10 @@ method loopback
@@ -103,9 +103,9 @@
  
    up
 -    [[/bin/ip link set dev %iface% address %hwaddress%]]
--    /sbin/dhclient -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+-    /sbin/dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
 +    [[ip link set dev %iface% address %hwaddress%]]
-+    dhclient -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++    dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
  	[[-e IF_METRIC=%metric%]] \
          if (execable("/sbin/dhclient"))
 -    /sbin/pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \
@@ -122,14 +122,13 @@
          elsif (1)
  
    down
--    /sbin/dhclient -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
-+    dhclient -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+-    /sbin/dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++    dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
          if (execable("/sbin/dhclient"))
 -    /sbin/pump -i %iface% -r \
 +    pump -i %iface% -r \
          elsif (execable("/sbin/pump"))
--    if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface%.pid); fi \
-+    if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(cat /run/udhcpc.%iface%.pid); kill -TERM $(cat /run/udhcpc.%iface%.pid); fi \
+     if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface%.pid); fi \
          elsif (execable("/sbin/udhcpc"))
 -    /sbin/dhcpcd -k %iface% \
 +    dhcpcd -k %iface% \
@@ -252,9 +251,9 @@
  
    up
 -    [[/sbin/ifconfig %iface% link %hwaddress%]]
--    /sbin/dhclient -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+-    /sbin/dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
 +    [[ifconfig %iface% link %hwaddress%]]
-+    dhclient -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++    dhclient -4 -v -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
  	[[-e IF_METRIC=%metric%]] \
          if (execable("/sbin/dhclient"))
 -    /sbin/udhcpc -n -p /run/udhcpc.%iface%.pid -i %iface% [[-H %hostname%]] \
@@ -269,11 +268,10 @@
          elsif (1)
  
    down
--    /sbin/dhclient -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
-+    dhclient -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
+-    /sbin/dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
++    dhclient -4 -v -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \
          if (execable("/sbin/dhclient"))
--    if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface%.pid); fi \
-+    if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(cat /run/udhcpc.%iface%.pid); kill -TERM $(cat /run/udhcpc.%iface%.pid); fi \
+     if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface%.pid); fi \
          elsif (execable("/sbin/udhcpc"))
 -    /sbin/dhcpcd -k %iface% \
 +    dhcpcd -k %iface% \
@@ -341,8 +339,8 @@
  
    up
      [[Warning: Option hwaddress: %hwaddress% not yet supported]]
--    /sbin/dhclient -v -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
-+    dhclient -v -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
+-    /sbin/dhclient -4 -v -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
++    dhclient -4 -v -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
          if (execable("/sbin/dhclient"))
 -    /sbin/udhcpc -n -p /run/udhcpc.%iface///.%.pid -i %iface% [[-H %hostname%]] \
 +    udhcpc -n -p /run/udhcpc.%iface///.%.pid -i %iface% [[-H %hostname%]] \
@@ -356,11 +354,10 @@
          elsif (1)
  
    down
--    /sbin/dhclient -v -r -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
-+    dhclient -v -r -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
+-    /sbin/dhclient -4 -v -r -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
++    dhclient -4 -v -r -pf /run/dhclient.%iface///.%.pid -lf /var/lib/dhcp/dhclient.%iface///.%.leases -I -df /var/lib/dhcp/dhclient6.%iface///.%.leases %iface% \
          if (execable("/sbin/dhclient"))
--    if test -f /run/udhcpc.%iface///.%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface///.%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface///.%.pid); fi \
-+    if test -f /run/udhcpc.%iface///.%.pid; then kill -USR2 $(cat /run/udhcpc.%iface///.%.pid); kill -TERM $(cat /run/udhcpc.%iface///.%.pid); fi \
+     if test -f /run/udhcpc.%iface///.%.pid; then kill -USR2 $(/bin/cat /run/udhcpc.%iface///.%.pid); kill -TERM $(/bin/cat /run/udhcpc.%iface///.%.pid); fi \
          elsif (execable("/sbin/udhcpc"))
 -    /sbin/dhcpcd -k %iface% \
 +    dhcpcd -k %iface% \
@@ -402,5 +399,5 @@
 -    /usr/sbin/avahi-autoipd --kill %iface%
 +    avahi-autoipd --kill %iface%
 -- 
-2.7.4
+2.17.1
 
diff --git a/poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb b/poky/meta/recipes-core/ifupdown/ifupdown_0.8.22.bb
similarity index 93%
rename from poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
rename to poky/meta/recipes-core/ifupdown/ifupdown_0.8.22.bb
index e9f3a2a..bd0989e 100644
--- a/poky/meta/recipes-core/ifupdown/ifupdown_0.8.16.bb
+++ b/poky/meta/recipes-core/ifupdown/ifupdown_0.8.22.bb
@@ -10,8 +10,9 @@
 	   file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
 	   file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
 	   file://99_network \
+	   file://0001-Define-FNM_EXTMATCH-for-musl.patch \
 	  "
-SRCREV = "11b9f99f7ecc7052497e6786156cfed531f11823"
+SRCREV = "ab5a0f464e53e172316a5ca8b5dcdc49e8848999"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb
new file mode 100644
index 0000000..9c083bd
--- /dev/null
+++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb
@@ -0,0 +1,176 @@
+SUMMARY = "Updates the NVD CVE database"
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+inherit native
+
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
+deltask do_populate_sysroot
+
+python () {
+    if not d.getVar("CVE_CHECK_DB_FILE"):
+        raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
+}
+
+python do_populate_cve_db() {
+    """
+    Update NVD database with json data feed
+    """
+
+    import sqlite3, urllib, shutil, gzip
+    from datetime import date
+
+    BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-"
+    YEAR_START = 2002
+
+    db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK')
+    db_file = os.path.join(db_dir, 'nvdcve_1.0.db')
+    json_tmpfile = os.path.join(db_dir, 'nvd.json.gz')
+    proxy = d.getVar("https_proxy")
+    cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a')
+
+    if not os.path.isdir(db_dir):
+        os.mkdir(db_dir)
+
+    # Connect to database
+    conn = sqlite3.connect(db_file)
+    c = conn.cursor()
+
+    initialize_db(c)
+
+    for year in range(YEAR_START, date.today().year + 1):
+        year_url = BASE_URL + str(year)
+        meta_url = year_url + ".meta"
+        json_url = year_url + ".json.gz"
+
+        # Retrieve meta last modified date
+        req = urllib.request.Request(meta_url)
+        if proxy:
+            req.set_proxy(proxy, 'https')
+        with urllib.request.urlopen(req) as r:
+            for l in r.read().decode("utf-8").splitlines():
+                key, value = l.split(":", 1)
+                if key == "lastModifiedDate":
+                    last_modified = value
+                    break
+            else:
+                bb.warn("Cannot parse CVE metadata, update failed")
+                return
+
+        # Compare with current db last modified date
+        c.execute("select DATE from META where YEAR = ?", (year,))
+        meta = c.fetchone()
+        if not meta or meta[0] != last_modified:
+            # Clear products table entries corresponding to current year
+            c.execute("delete from PRODUCTS where ID like ?", ('CVE-%d%%' % year,))
+
+            # Update db with current year json file
+            try:
+                req = urllib.request.Request(json_url)
+                if proxy:
+                    req.set_proxy(proxy, 'https')
+                with urllib.request.urlopen(req) as r:
+                    update_db(c, gzip.decompress(r.read()))
+                c.execute("insert or replace into META values (?, ?)", [year, last_modified])
+            except urllib.error.URLError as e:
+                cve_f.write('Warning: CVE db update error, CVE data is outdated.\n\n')
+                bb.warn("Cannot parse CVE data (%s), update failed" % e.reason)
+                return
+
+        # Update success, set the date to cve_check file.
+        if year == date.today().year:
+            cve_f.write('CVE database update : %s\n\n' % date.today())
+
+    cve_f.close()
+    conn.commit()
+    conn.close()
+}
+
+def initialize_db(c):
+    c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
+    c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \
+        SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)")
+    c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \
+        VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \
+        VERSION_END TEXT, OPERATOR_END TEXT)")
+
+def parse_node_and_insert(c, node, cveId):
+    # Parse children node if needed
+    for child in node.get('children', ()):
+        parse_node_and_insert(c, child, cveId)
+
+    def cpe_generator():
+        for cpe in node.get('cpe_match', ()):
+            if not cpe['vulnerable']:
+                return
+            cpe23 = cpe['cpe23Uri'].split(':')
+            vendor = cpe23[3]
+            product = cpe23[4]
+            version = cpe23[5]
+
+            if version != '*':
+                # Version is defined, this is a '=' match
+                yield [cveId, vendor, product, version, '=', '', '']
+            else:
+                # Parse start version, end version and operators
+                op_start = ''
+                op_end = ''
+                v_start = ''
+                v_end = ''
+
+                if 'versionStartIncluding' in cpe:
+                    op_start = '>='
+                    v_start = cpe['versionStartIncluding']
+
+                if 'versionStartExcluding' in cpe:
+                    op_start = '>'
+                    v_start = cpe['versionStartExcluding']
+
+                if 'versionEndIncluding' in cpe:
+                    op_end = '<='
+                    v_end = cpe['versionEndIncluding']
+
+                if 'versionEndExcluding' in cpe:
+                    op_end = '<'
+                    v_end = cpe['versionEndExcluding']
+
+                yield [cveId, vendor, product, v_start, op_start, v_end, op_end]
+
+    c.executemany("insert into PRODUCTS values (?, ?, ?, ?, ?, ?, ?)", cpe_generator())
+
+def update_db(c, jsondata):
+    import json
+    root = json.loads(jsondata)
+
+    for elt in root['CVE_Items']:
+        if not elt['impact']:
+            continue
+
+        cveId = elt['cve']['CVE_data_meta']['ID']
+        cveDesc = elt['cve']['description']['description_data'][0]['value']
+        date = elt['lastModifiedDate']
+        accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
+        cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
+
+        try:
+            cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
+        except:
+            cvssv3 = 0.0
+
+        c.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)",
+                [cveId, cveDesc, cvssv2, cvssv3, date, accessVector])
+
+        configurations = elt['configurations']['nodes']
+        for config in configurations:
+            parse_node_and_insert(c, config, cveId)
+
+
+addtask do_populate_cve_db before do_fetch
+do_populate_cve_db[nostamp] = "1"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/poky/meta/recipes-core/meta/cve-update-db.bb b/poky/meta/recipes-core/meta/cve-update-db.bb
deleted file mode 100644
index 522fd23..0000000
--- a/poky/meta/recipes-core/meta/cve-update-db.bb
+++ /dev/null
@@ -1,121 +0,0 @@
-SUMMARY = "Updates the NVD CVE database"
-LICENSE = "MIT"
-
-INHIBIT_DEFAULT_DEPS = "1"
-PACKAGES = ""
-
-inherit nopackages
-
-deltask do_fetch
-deltask do_unpack
-deltask do_patch
-deltask do_configure
-deltask do_compile
-deltask do_install
-deltask do_populate_sysroot
-
-python do_populate_cve_db() {
-    """
-    Update NVD database with json data feed
-    """
-
-    import sqlite3, urllib3, shutil, gzip, re
-    from datetime import date
-
-    BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-"
-    YEAR_START = 2002
-    JSON_TMPFILE = d.getVar("CVE_CHECK_DB_DIR") + '/nvd.json.gz'
-
-    # Connect to database
-    db_file = d.getVar("CVE_CHECK_DB_FILE")
-    conn = sqlite3.connect(db_file)
-    c = conn.cursor()
-
-    initialize_db(c)
-
-    http = urllib3.PoolManager()
-
-    for year in range(YEAR_START, date.today().year + 1):
-        year_url = BASE_URL + str(year)
-        meta_url = year_url + ".meta"
-        json_url = year_url + ".json.gz"
-
-        # Retrieve meta last modified date
-        with http.request('GET', meta_url, preload_content=False) as r:
-            date_line = str(r.data.splitlines()[0])
-            last_modified = re.search('lastModifiedDate:(.*)', date_line).group(1)
-
-        # Compare with current db last modified date
-        c.execute("select DATE from META where YEAR = '%d'" % year)
-        meta = c.fetchone()
-        if not meta or meta[0] != last_modified:
-            # Update db with current year json file
-            with http.request('GET', json_url, preload_content=False) as r, open(JSON_TMPFILE, 'wb') as tmpfile:
-                shutil.copyfileobj(r, tmpfile)
-            with gzip.open(JSON_TMPFILE, 'rt') as jsonfile:
-                update_db(c, jsonfile)
-            c.execute("insert or replace into META values (?, ?)",
-                    [year, last_modified])
-
-    conn.commit()
-    conn.close()
-
-    with open(d.getVar("CVE_CHECK_TMP_FILE"), 'a'):
-        os.utime(d.getVar("CVE_CHECK_TMP_FILE"), None)
-}
-
-# DJB2 hash algorithm
-def hash_djb2(s):
-    hash = 5381
-    for x in s:
-        hash = (( hash << 5) + hash) + ord(x)
-
-    return hash & 0xFFFFFFFF
-
-def initialize_db(c):
-    c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)")
-    c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \
-        SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)")
-    c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (HASH INTEGER UNIQUE, ID TEXT, \
-        VENDOR TEXT, PRODUCT TEXT, VERSION TEXT, OPERATOR TEXT)")
-    c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_IDX ON PRODUCTS \
-        (PRODUCT, VERSION)")
-
-def update_db(c, json_filename):
-    import json
-    root = json.load(json_filename)
-
-    for elt in root['CVE_Items']:
-        if not elt['impact']:
-            continue
-
-        cveId = elt['cve']['CVE_data_meta']['ID']
-        cveDesc = elt['cve']['description']['description_data'][0]['value']
-        date = elt['lastModifiedDate']
-        accessVector = elt['impact']['baseMetricV2']['cvssV2']['accessVector']
-        cvssv2 = elt['impact']['baseMetricV2']['cvssV2']['baseScore']
-
-        try:
-            cvssv3 = elt['impact']['baseMetricV3']['cvssV3']['baseScore']
-        except:
-            cvssv3 = 0.0
-
-        c.execute("insert or replace into NVD values (?, ?, ?, ?, ?, ?)",
-                [cveId, cveDesc, cvssv2, cvssv3, date, accessVector])
-
-        for vendor in elt['cve']['affects']['vendor']['vendor_data']:
-            for product in vendor['product']['product_data']:
-                for version in product['version']['version_data']:
-                    product_str = cveId+vendor['vendor_name']+product['product_name']+version['version_value']
-                    hashstr = hash_djb2(product_str)
-                    c.execute("insert or replace into PRODUCTS values (?, ?, ?, ?, ?, ?)",
-                            [ hashstr, cveId, vendor['vendor_name'],
-                                product['product_name'], version['version_value'],
-                                version['version_affected']])
-
-
-
-addtask do_populate_cve_db before do_cve_check
-do_populate_cve_db[nostamp] = "1"
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
index b5e8c0f..c33cb80 100644
--- a/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
+++ b/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -47,6 +47,7 @@
     /usr/bin/env \
     /usr/bin/perl \
     libperl.so.5 \
+    libperl.so.5()(64bit) \
     pkgconfig \
     pkgconfig-dev \
     pkgconfig-src \
diff --git a/poky/meta/recipes-core/musl/musl-obstack.bb b/poky/meta/recipes-core/musl/musl-obstack.bb
new file mode 100644
index 0000000..3003935
--- /dev/null
+++ b/poky/meta/recipes-core/musl/musl-obstack.bb
@@ -0,0 +1,22 @@
+# Copyright (C) 2019 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "A standalone library to implement GNU libc's obstack"
+DESCRIPTION = "copy + paste of the obstack functions and macros found in GNU gcc libiberty library for use with musl libc"
+HOMEPAGE = "https://github.com/pullmoll/musl-obstack"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3d23e4eef8243efcaab6f0a438078932"
+SECTION = "libs"
+
+PV = "1.1"
+SRCREV = "d2ad66b0df44a4b784956f7f7f2717131ddc05f4"
+SRC_URI = "git://github.com/pullmoll/musl-obstack"
+
+UPSTREAM_CHECK_COMMITS = "1"
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/git"
+
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/poky/meta/recipes-core/musl/musl.inc b/poky/meta/recipes-core/musl/musl.inc
index 8408c5d..0683bf8 100644
--- a/poky/meta/recipes-core/musl/musl.inc
+++ b/poky/meta/recipes-core/musl/musl.inc
@@ -9,7 +9,7 @@
 HOMEPAGE = "http://www.musl-libc.org/"
 LICENSE = "MIT"
 SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8a4bb28f771c817fe57d3a7c4240e3aa"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d0fe2be17bc45ff4a42ade1c13ed6340"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb
index a7fae4a..039932a 100644
--- a/poky/meta/recipes-core/musl/musl_git.bb
+++ b/poky/meta/recipes-core/musl/musl_git.bb
@@ -4,9 +4,9 @@
 require musl.inc
 inherit linuxloader
 
-SRCREV = "ac304227bb3ea1787d581f17d76a5f5f3abff51f"
+SRCREV = "0ce49d0a301b4142741b32773492af90f66ed3ca"
 
-BASEVER = "1.1.22"
+BASEVER = "1.1.23"
 
 PV = "${BASEVER}+git${SRCPV}"
 
diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-base.bb b/poky/meta/recipes-core/packagegroups/packagegroup-base.bb
index d054036..1f802da 100644
--- a/poky/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/poky/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -7,7 +7,6 @@
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup
-inherit bluetooth
 
 PROVIDES = "${PACKAGES}"
 PACKAGES = ' \
@@ -199,8 +198,7 @@
 
 SUMMARY_packagegroup-base-bluetooth = "Bluetooth support"
 RDEPENDS_packagegroup-base-bluetooth = "\
-    ${BLUEZ} \
-    ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', bb.utils.contains('BLUEZ', 'bluez4', 'libasound-module-bluez', '', d), '',d)} \
+    bluez5 \
     "
 
 RRECOMMENDS_packagegroup-base-bluetooth = "\
diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 8dc445d..3a2f50f 100644
--- a/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -18,9 +18,6 @@
 
 # Distro can override the following VIRTUAL-RUNTIME providers:
 VIRTUAL-RUNTIME_dev_manager ?= "udev"
-VIRTUAL-RUNTIME_login_manager ?= "busybox"
-VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
 EFI_PROVIDER ??= "grub-efi"
diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index 15d0989..8854ec4 100644
--- a/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -32,6 +32,7 @@
 SANITIZERS_mipsarch = ""
 SANITIZERS_nios2 = ""
 SANITIZERS_riscv64 = ""
+SANITIZERS_riscv32 = ""
 SANITIZERS_libc-musl = ""
 
 RRECOMMENDS_packagegroup-core-sdk = "\
diff --git a/poky/meta/recipes-core/psplash/files/psplash-init b/poky/meta/recipes-core/psplash/files/psplash-init
index 0bce1de..fee23e6 100755
--- a/poky/meta/recipes-core/psplash/files/psplash-init
+++ b/poky/meta/recipes-core/psplash/files/psplash-init
@@ -24,6 +24,7 @@
 done
 
 export TMPDIR=/mnt/.psplash
+[ -d $TMPDIR ] || mkdir -p $TMPDIR
 mount tmpfs -t tmpfs $TMPDIR -o,size=40k
 
 rotation=0
diff --git a/poky/meta/recipes-core/psplash/psplash_git.bb b/poky/meta/recipes-core/psplash/psplash_git.bb
index 3161a5e..56734c1 100644
--- a/poky/meta/recipes-core/psplash/psplash_git.bb
+++ b/poky/meta/recipes-core/psplash/psplash_git.bb
@@ -97,7 +97,6 @@
 }
 
 do_install_append() {
-	install -d ${D}/mnt/.psplash/
 	install -d ${D}${sysconfdir}/init.d/
 	install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
 	install -d ${D}${bindir}
@@ -107,8 +106,6 @@
 	rm -f ${D}${bindir}/psplash
 }
 
-FILES_${PN} += "/mnt/.psplash"
-
 INITSCRIPT_NAME = "psplash.sh"
 INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
 
diff --git a/poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
index e9c2466..d13b8c5 100644
--- a/poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
+++ b/poky/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -3,6 +3,7 @@
 SUMMARY = "Basic systemd-boot configuration files"
 
 RPROVIDES_${PN} += "virtual/systemd-bootconf"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit systemd-boot-cfg
 
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch b/poky/meta/recipes-core/systemd/systemd/0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch
new file mode 100644
index 0000000..ff64f58
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch
@@ -0,0 +1,39 @@
+From 6e2f78948403a4cce45b9e34311c9577c624f066 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Mon, 17 Jun 2019 10:51:25 +0200
+Subject: [PATCH] core: set fs.file-max sysctl to LONG_MAX rather than
+ ULONG_MAX
+
+Since kernel 5.2 the kernel thankfully returns proper errors when we
+write a value out of range to the sysctl. Which however breaks writing
+ULONG_MAX to request the maximum value. Hence let's write the new
+maximum value instead, LONG_MAX.
+
+/cc @brauner
+
+Fixes: #12803
+
+Upstream-Status: Backport
+
+Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
+---
+ src/core/main.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index b33ea1b5b5..e7f51815f0 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -1245,9 +1245,9 @@ static void bump_file_max_and_nr_open(void) {
+ #endif
+ 
+ #if BUMP_PROC_SYS_FS_FILE_MAX
+-        /* I so wanted to use STRINGIFY(ULONG_MAX) here, but alas we can't as glibc/gcc define that as
+-         * "(0x7fffffffffffffffL * 2UL + 1UL)". Seriously. 😢 */
+-        if (asprintf(&t, "%lu\n", ULONG_MAX) < 0) {
++        /* The maximum the kernel allows for this since 5.2 is LONG_MAX, use that. (Previously thing where
++         * different but the operation would fail silently.) */
++        if (asprintf(&t, "%li\n", LONG_MAX) < 0) {
+                 log_oom();
+                 return;
+         }
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-networkd-fix-link-up.patch b/poky/meta/recipes-core/systemd/systemd/0001-networkd-fix-link-up.patch
new file mode 100644
index 0000000..4c7a0a3
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-networkd-fix-link-up.patch
@@ -0,0 +1,66 @@
+From 6bd76d2d4ff130decd3aa13e0c2dbfd56ff8d7b7 Mon Sep 17 00:00:00 2001
+From: Susant Sahani <ssahani@gmail.com>
+Date: Thu, 9 May 2019 07:35:35 +0530
+Subject: [PATCH] networkd: fix link_up() (#12505)
+
+Fillup IFLA_INET6_ADDR_GEN_MODE while we do link_up.
+
+Fixes the following error:
+```
+dummy-test: Could not bring up interface: Invalid argument
+```
+
+After reading the kernel code when we do a link up
+```
+net/core/rtnetlink.c
+IFLA_AF_SPEC
+ af_ops->set_link_af(dev, af);
+  inet6_set_link_af
+   if (tb[IFLA_INET6_ADDR_GEN_MODE])
+             Here it looks for IFLA_INET6_ADDR_GEN_MODE
+```
+Since link up we didn't filling up that it's failing.
+
+Closes #12504.
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/4eb086a38712ea98faf41e075b84555b11b54362.patch]
+
+---
+ src/network/networkd-link.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index e466b96792..042496173c 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -2034,6 +2034,8 @@ static int link_up(Link *link) {
+         }
+ 
+         if (link_ipv6_enabled(link)) {
++                uint8_t ipv6ll_mode;
++
+                 r = sd_netlink_message_open_container(req, IFLA_AF_SPEC);
+                 if (r < 0)
+                         return log_link_error_errno(link, r, "Could not open IFLA_AF_SPEC container: %m");
+@@ -2049,6 +2051,19 @@ static int link_up(Link *link) {
+                                 return log_link_error_errno(link, r, "Could not append IFLA_INET6_TOKEN: %m");
+                 }
+ 
++                if (!link_ipv6ll_enabled(link))
++                        ipv6ll_mode = IN6_ADDR_GEN_MODE_NONE;
++                else if (sysctl_read_ip_property(AF_INET6, link->ifname, "stable_secret", NULL) < 0)
++                        /* The file may not exist. And event if it exists, when stable_secret is unset,
++                         * reading the file fails with EIO. */
++                        ipv6ll_mode = IN6_ADDR_GEN_MODE_EUI64;
++                else
++                        ipv6ll_mode = IN6_ADDR_GEN_MODE_STABLE_PRIVACY;
++
++                r = sd_netlink_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode);
++                if (r < 0)
++                        return log_link_error_errno(link, r, "Could not append IFLA_INET6_ADDR_GEN_MODE: %m");
++
+                 r = sd_netlink_message_close_container(req);
+                 if (r < 0)
+                         return log_link_error_errno(link, r, "Could not close AF_INET6 container: %m");
diff --git a/poky/meta/recipes-core/systemd/systemd/0002-network-do-not-send-ipv6.patch b/poky/meta/recipes-core/systemd/systemd/0002-network-do-not-send-ipv6.patch
new file mode 100644
index 0000000..2565314
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0002-network-do-not-send-ipv6.patch
@@ -0,0 +1,96 @@
+From b5c4eb818101127a606849e822937b15b8497c75 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Thu, 9 May 2019 14:39:46 +0900
+Subject: [PATCH] network: do not send ipv6 token to kernel
+
+We disabled kernel RA support. Then, we should not send
+IFLA_INET6_TOKEN.
+Thus, we do not need to send IFLA_INET6_ADDR_GEN_MODE twice.
+
+Follow-up for 0e2fdb83bb5e22047e0c7cc058b415d0e93f02cf and
+4eb086a38712ea98faf41e075b84555b11b54362.
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/9f6e82e6eb3b6e73d66d00d1d6eee60691fb702f]
+
+---
+ src/network/networkd-link.c | 51 +++++--------------------------------
+ 1 file changed, 6 insertions(+), 45 deletions(-)
+
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index 042496173c..c49dba33da 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -1940,6 +1940,9 @@ static int link_configure_addrgen_mode(Link *link) {
+         assert(link->manager);
+         assert(link->manager->rtnl);
+ 
++        if (!socket_ipv6_is_supported())
++                return 0;
++
+         log_link_debug(link, "Setting address genmode for link");
+ 
+         r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_SETLINK, link->ifindex);
+@@ -2033,46 +2036,6 @@ static int link_up(Link *link) {
+                         return log_link_error_errno(link, r, "Could not set MAC address: %m");
+         }
+ 
+-        if (link_ipv6_enabled(link)) {
+-                uint8_t ipv6ll_mode;
+-
+-                r = sd_netlink_message_open_container(req, IFLA_AF_SPEC);
+-                if (r < 0)
+-                        return log_link_error_errno(link, r, "Could not open IFLA_AF_SPEC container: %m");
+-
+-                /* if the kernel lacks ipv6 support setting IFF_UP fails if any ipv6 options are passed */
+-                r = sd_netlink_message_open_container(req, AF_INET6);
+-                if (r < 0)
+-                        return log_link_error_errno(link, r, "Could not open AF_INET6 container: %m");
+-
+-                if (!in_addr_is_null(AF_INET6, &link->network->ipv6_token)) {
+-                        r = sd_netlink_message_append_in6_addr(req, IFLA_INET6_TOKEN, &link->network->ipv6_token.in6);
+-                        if (r < 0)
+-                                return log_link_error_errno(link, r, "Could not append IFLA_INET6_TOKEN: %m");
+-                }
+-
+-                if (!link_ipv6ll_enabled(link))
+-                        ipv6ll_mode = IN6_ADDR_GEN_MODE_NONE;
+-                else if (sysctl_read_ip_property(AF_INET6, link->ifname, "stable_secret", NULL) < 0)
+-                        /* The file may not exist. And event if it exists, when stable_secret is unset,
+-                         * reading the file fails with EIO. */
+-                        ipv6ll_mode = IN6_ADDR_GEN_MODE_EUI64;
+-                else
+-                        ipv6ll_mode = IN6_ADDR_GEN_MODE_STABLE_PRIVACY;
+-
+-                r = sd_netlink_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode);
+-                if (r < 0)
+-                        return log_link_error_errno(link, r, "Could not append IFLA_INET6_ADDR_GEN_MODE: %m");
+-
+-                r = sd_netlink_message_close_container(req);
+-                if (r < 0)
+-                        return log_link_error_errno(link, r, "Could not close AF_INET6 container: %m");
+-
+-                r = sd_netlink_message_close_container(req);
+-                if (r < 0)
+-                        return log_link_error_errno(link, r, "Could not close IFLA_AF_SPEC container: %m");
+-        }
+-
+         r = netlink_call_async(link->manager->rtnl, NULL, req, link_up_handler,
+                                link_netlink_destroy_callback, link);
+         if (r < 0)
+@@ -3208,11 +3171,9 @@ static int link_configure(Link *link) {
+         if (r < 0)
+                 return r;
+ 
+-        if (socket_ipv6_is_supported()) {
+-                r = link_configure_addrgen_mode(link);
+-                if (r < 0)
+-                        return r;
+-        }
++        r = link_configure_addrgen_mode(link);
++        if (r < 0)
++                return r;
+ 
+         return link_configure_after_setting_mtu(link);
+ }
diff --git a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index a2e25a9..df1043b 100644
--- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -43,8 +43,6 @@
  src/udev/udev-rules.c                      |  1 +
  29 files changed, 40 insertions(+)
 
-diff --git a/meson.build b/meson.build
-index 79195c9..80d9564 100644
 --- a/meson.build
 +++ b/meson.build
 @@ -572,6 +572,7 @@ foreach ident : [
@@ -55,8 +53,6 @@
  ]
  
          have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
-diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
-index dfd6805..c2b2ace 100644
 --- a/src/backlight/backlight.c
 +++ b/src/backlight/backlight.c
 @@ -17,6 +17,7 @@
@@ -67,8 +63,6 @@
  
  static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
          const char *subsystem, *sysname, *value;
-diff --git a/src/basic/env-util.c b/src/basic/env-util.c
-index fd449dc..e2b0722 100644
 --- a/src/basic/env-util.c
 +++ b/src/basic/env-util.c
 @@ -16,6 +16,7 @@
@@ -79,8 +73,6 @@
  
  #define VALID_CHARS_ENV_NAME                    \
          DIGITS LETTERS                          \
-diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
-index 188a8d4..1e16ec2 100644
 --- a/src/basic/missing_stdlib.h
 +++ b/src/basic/missing_stdlib.h
 @@ -11,3 +11,15 @@
@@ -99,8 +91,6 @@
 +    (char *)memcpy(__new, __old, __len); \
 +  })
 +#endif
-diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
-index 6b82eab..51c6b78 100644
 --- a/src/basic/mkdir.c
 +++ b/src/basic/mkdir.c
 @@ -14,6 +14,7 @@
@@ -111,8 +101,6 @@
  
  int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) {
          struct stat st;
-diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index 87724af..d9c53bc 100644
 --- a/src/basic/parse-util.c
 +++ b/src/basic/parse-util.c
 @@ -19,6 +19,7 @@
@@ -123,8 +111,6 @@
  
  int parse_boolean(const char *v) {
          if (!v)
-diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
-index 1670001..b51feaa 100644
 --- a/src/basic/proc-cmdline.c
 +++ b/src/basic/proc-cmdline.c
 @@ -15,6 +15,7 @@
@@ -135,8 +121,6 @@
  
  int proc_cmdline(char **ret) {
          const char *e;
-diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
-index 7aaf95b..42ce53d 100644
 --- a/src/basic/procfs-util.c
 +++ b/src/basic/procfs-util.c
 @@ -11,6 +11,7 @@
@@ -147,8 +131,6 @@
  
  int procfs_tasks_get_limit(uint64_t *ret) {
          _cleanup_free_ char *value = NULL;
-diff --git a/src/basic/time-util.c b/src/basic/time-util.c
-index daf952b..374b97f 100644
 --- a/src/basic/time-util.c
 +++ b/src/basic/time-util.c
 @@ -28,6 +28,7 @@
@@ -159,8 +141,6 @@
  
  static clockid_t map_clock_id(clockid_t c) {
  
-diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
-index 4615aea..bc1364f 100644
 --- a/src/core/dbus-cgroup.c
 +++ b/src/core/dbus-cgroup.c
 @@ -15,6 +15,7 @@
@@ -171,8 +151,6 @@
  
  static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
  
-diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
-index f4fbb72..0a1e3b5 100644
 --- a/src/core/dbus-util.c
 +++ b/src/core/dbus-util.c
 @@ -7,6 +7,7 @@
@@ -183,8 +161,6 @@
  
  int bus_property_get_triggered_unit(
                  sd_bus *bus,
-diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index a91cfeb..a459610 100644
 --- a/src/core/kmod-setup.c
 +++ b/src/core/kmod-setup.c
 @@ -11,6 +11,7 @@
@@ -195,8 +171,6 @@
  
  #if HAVE_KMOD
  #include <libkmod.h>
-diff --git a/src/core/service.c b/src/core/service.c
-index 0289990..0e725b5 100644
 --- a/src/core/service.c
 +++ b/src/core/service.c
 @@ -42,6 +42,7 @@
@@ -207,8 +181,6 @@
  
  static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
          [SERVICE_DEAD] = UNIT_INACTIVE,
-diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
-index 0048909..0e85eb7 100644
 --- a/src/journal/journalctl.c
 +++ b/src/journal/journalctl.c
 @@ -67,6 +67,7 @@
@@ -219,8 +191,6 @@
  
  #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
  
-diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
-index 427d42f..b050568 100644
 --- a/src/libsystemd/sd-bus/bus-message.c
 +++ b/src/libsystemd/sd-bus/bus-message.c
 @@ -21,6 +21,7 @@
@@ -231,8 +201,6 @@
  
  static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
  
-diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
-index d9fc256..e9c6932 100644
 --- a/src/libsystemd/sd-bus/bus-objects.c
 +++ b/src/libsystemd/sd-bus/bus-objects.c
 @@ -13,6 +13,7 @@
@@ -243,8 +211,6 @@
  
  static int node_vtable_get_userdata(
                  sd_bus *bus,
-diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
-index 8de0a85..4fd0a2e 100644
 --- a/src/libsystemd/sd-bus/test-bus-benchmark.c
 +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
 @@ -14,6 +14,7 @@
@@ -255,8 +221,6 @@
  
  #define MAX_SIZE (2*1024*1024)
  
-diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
-index b8bd181..fe0cae0 100644
 --- a/src/locale/keymap-util.c
 +++ b/src/locale/keymap-util.c
 @@ -23,6 +23,7 @@
@@ -267,8 +231,6 @@
  
  static bool startswith_comma(const char *s, const char *prefix) {
          s = startswith(s, prefix);
-diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
-index 476cb07..91e28de 100644
 --- a/src/nspawn/nspawn-settings.c
 +++ b/src/nspawn/nspawn-settings.c
 @@ -16,6 +16,7 @@
@@ -279,8 +241,6 @@
  
  Settings *settings_new(void) {
          Settings *s;
-diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
-index 4b31cb3..989ebf3 100644
 --- a/src/shared/dns-domain.c
 +++ b/src/shared/dns-domain.c
 @@ -24,6 +24,7 @@
@@ -291,8 +251,6 @@
  
  int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
          const char *n;
-diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
-index 8638cd3..d03774a 100644
 --- a/src/shared/journal-importer.c
 +++ b/src/shared/journal-importer.c
 @@ -13,6 +13,7 @@
@@ -303,8 +261,6 @@
  
  enum {
          IMPORTER_STATE_LINE = 0,    /* waiting to read, or reading line */
-diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
-index 5fb736f..19cb165 100644
 --- a/src/shared/logs-show.c
 +++ b/src/shared/logs-show.c
 @@ -38,6 +38,7 @@
@@ -315,8 +271,6 @@
  
  /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
  #define PRINT_LINE_THRESHOLD 3
-diff --git a/src/shared/pager.c b/src/shared/pager.c
-index 2abb0f6..a00c95f 100644
 --- a/src/shared/pager.c
 +++ b/src/shared/pager.c
 @@ -25,6 +25,7 @@
@@ -327,8 +281,6 @@
  
  static pid_t pager_pid = 0;
  
-diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
-index 442fde7..0eb1188 100644
 --- a/src/shared/path-lookup.c
 +++ b/src/shared/path-lookup.c
 @@ -20,6 +20,7 @@
@@ -339,8 +291,6 @@
  
  int xdg_user_runtime_dir(char **ret, const char *suffix) {
          const char *e;
-diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
-index 7cb7d8a..8b12b91 100644
 --- a/src/shared/uid-range.c
 +++ b/src/shared/uid-range.c
 @@ -9,6 +9,7 @@
@@ -351,8 +301,6 @@
  
  static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
          assert(range);
-diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
-index abbbc9f..6179b58 100644
 --- a/src/socket-proxy/socket-proxyd.c
 +++ b/src/socket-proxy/socket-proxyd.c
 @@ -28,6 +28,7 @@
@@ -363,8 +311,6 @@
  
  #define BUFFER_SIZE (256 * 1024)
  
-diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index 5221742..a05e778 100644
 --- a/src/test/test-hexdecoct.c
 +++ b/src/test/test-hexdecoct.c
 @@ -6,6 +6,7 @@
@@ -375,8 +321,6 @@
  
  static void test_hexchar(void) {
          assert_se(hexchar(0xa) == 'a');
-diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
-index 7ce1c56..cc19b8e 100644
 --- a/src/udev/udev-builtin-path_id.c
 +++ b/src/udev/udev-builtin-path_id.c
 @@ -23,6 +23,7 @@
@@ -387,8 +331,6 @@
  
  _printf_(2,3)
  static void path_prepend(char **path, const char *fmt, ...) {
-diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
-index ee87d7c..9aced10 100644
 --- a/src/udev/udev-rules.c
 +++ b/src/udev/udev-rules.c
 @@ -40,6 +40,7 @@
@@ -399,6 +341,13 @@
  
  #define PREALLOC_TOKEN          2048
  #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
--- 
-2.11.0
-
+--- a/src/login/pam_systemd.c
++++ b/src/login/pam_systemd.c
+@@ -27,6 +27,7 @@
+ #include "hostname-util.h"
+ #include "login-util.h"
+ #include "macro.h"
++#include "missing.h"
+ #include "parse-util.h"
+ #include "path-util.h"
+ #include "process-util.h"
diff --git a/poky/meta/recipes-core/systemd/systemd_242.bb b/poky/meta/recipes-core/systemd/systemd_242.bb
index 29f64b9..1953fef 100644
--- a/poky/meta/recipes-core/systemd/systemd_242.bb
+++ b/poky/meta/recipes-core/systemd/systemd_242.bb
@@ -25,6 +25,9 @@
            file://0006-network-remove-redunant-link-name-in-message.patch \
            file://99-default.preset \
            file://0001-resolved-Fix-incorrect-use-of-OpenSSL-BUF_MEM.patch \
+           file://0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch \
+           file://0001-networkd-fix-link-up.patch \
+           file://0002-network-do-not-send-ipv6.patch \
            "
 
 # patches needed by musl
diff --git a/poky/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch b/poky/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
index 2575b59..e13ac9d 100644
--- a/poky/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
+++ b/poky/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
@@ -1,71 +1,50 @@
-From 29c7a529d3bb0c1e20239f885e74c5036f1a908c Mon Sep 17 00:00:00 2001
+From 3c29a86f351ea4827dc445bb8e6cb774543c9be6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 6 Aug 2018 15:38:58 -0700
-Subject: [PATCH] include sys/sysmacros.h for major/minor defines in glibc
+Subject: [PATCH] include sys/sysmacros.h for major/minor definitions
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
----
- src/bootlogd.c |   3 +++
- src/bootlogd.o | Bin 58448 -> 60376 bytes
- src/dowall.c   |   3 +++
- src/shutdown.c |   4 +++-
- 4 files changed, 9 insertions(+), 1 deletion(-)
 
-Index: sysvinit-2.88dsf/src/bootlogd.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/bootlogd.c
-+++ sysvinit-2.88dsf/src/bootlogd.c
-@@ -53,6 +53,9 @@
- #ifdef __linux__
- #include <sys/mount.h>
+---
+ src/bootlogd.c   | 1 +
+ src/mountpoint.c | 1 +
+ src/shutdown.c   | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/bootlogd.c b/src/bootlogd.c
+index 570d382..68d62f3 100644
+--- a/src/bootlogd.c
++++ b/src/bootlogd.c
+@@ -35,6 +35,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/ioctl.h>
+ #include <sys/utsname.h>
+ #include <time.h>
+diff --git a/src/mountpoint.c b/src/mountpoint.c
+index 9e3dd9c..91f74ed 100644
+--- a/src/mountpoint.c
++++ b/src/mountpoint.c
+@@ -25,6 +25,7 @@
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/shutdown.c b/src/shutdown.c
+index 7e997da..17de58d 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -40,6 +40,7 @@
  #endif
-+#ifdef __GLIBC__
+ #include <sys/types.h>
+ #include <sys/stat.h>
 +#include <sys/sysmacros.h>
-+#endif
- 
- char *Version = "@(#) bootlogd 2.86 03-Jun-2004 miquels@cistron.nl";
- 
-Index: sysvinit-2.88dsf/src/dowall.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/dowall.c
-+++ sysvinit-2.88dsf/src/dowall.c
-@@ -37,6 +37,9 @@
- #include <signal.h>
- #include <setjmp.h>
- #include <paths.h>
-+#ifdef __GLIBC__
-+#include <sys/sysmacros.h>
-+#endif
- 
- #ifndef _PATH_DEV
- # define _PATH_DEV	"/dev/"
-Index: sysvinit-2.88dsf/src/shutdown.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/shutdown.c
-+++ sysvinit-2.88dsf/src/shutdown.c
-@@ -57,7 +57,9 @@
- #include "reboot.h"
- #include "initreq.h"
- #include "init.h"
--
-+#ifdef __GLIBC__
-+#include <sys/sysmacros.h>
-+#endif
- 
- char *Version = "@(#) shutdown 2.86-1 31-Jul-2004 miquels@cistron.nl";
- 
-Index: sysvinit-2.88dsf/src/mountpoint.c
-===================================================================
---- sysvinit-2.88dsf.orig/src/mountpoint.c
-+++ sysvinit-2.88dsf/src/mountpoint.c
-@@ -32,6 +32,9 @@
- #include <stdarg.h>
- #include <getopt.h>
- #include <stdio.h>
-+#ifdef __GLIBC__
-+#include <sys/sysmacros.h>
-+#endif
- 
- int dostat(char *path, struct stat *st, int do_lstat, int quiet)
- {
+ #include <sys/wait.h>
+ #include <time.h>
+ #include <string.h>
diff --git a/poky/meta/recipes-core/udev/eudev_3.2.7.bb b/poky/meta/recipes-core/udev/eudev_3.2.8.bb
similarity index 95%
rename from poky/meta/recipes-core/udev/eudev_3.2.7.bb
rename to poky/meta/recipes-core/udev/eudev_3.2.8.bb
index 1bea4eb..eecf64e 100644
--- a/poky/meta/recipes-core/udev/eudev_3.2.7.bb
+++ b/poky/meta/recipes-core/udev/eudev_3.2.8.bb
@@ -20,8 +20,8 @@
            file://udev.rules \
 "
 
-SRC_URI[md5sum] = "c75d99910c1791dd9430d26ab76059c0"
-SRC_URI[sha256sum] = "3004614bd253c1f98558460215027aaf60d7592c70be27fd384ec01db87bf062"
+SRC_URI[md5sum] = "ce166b3fdd910c2a4a840378f48fedaf"
+SRC_URI[sha256sum] = "61e4948e9e51271c3cce2bb5311a30b206dd03ef011062e6c627fb007e43f6b8"
 
 inherit autotools update-rc.d qemu pkgconfig distro_features_check
 
diff --git a/poky/meta/recipes-core/udev/udev-extraconf/mount.sh b/poky/meta/recipes-core/udev/udev-extraconf/mount.sh
index 3ee67b1..79eb014 100644
--- a/poky/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/poky/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -57,6 +57,8 @@
     vfat|fat)
         MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
         ;;
+    swap)
+        return ;;
     # TODO
     *)
         ;;
@@ -98,6 +100,8 @@
 	vfat|fat)
 		MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' /etc/group`"
 		;;
+	swap)
+		return ;;
 	# TODO
 	*)
 		;;
diff --git a/poky/meta/recipes-core/util-linux/util-linux/check-for-_HAVE_STRUCT_TERMIOS_C_OSPEED.patch b/poky/meta/recipes-core/util-linux/util-linux/check-for-_HAVE_STRUCT_TERMIOS_C_OSPEED.patch
deleted file mode 100644
index c92c276..0000000
--- a/poky/meta/recipes-core/util-linux/util-linux/check-for-_HAVE_STRUCT_TERMIOS_C_OSPEED.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Checking for exitence of the define is not enough since
-it will be defined with 0 or 1 value
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/sys-utils/ldattach.c
-+++ b/sys-utils/ldattach.c
-@@ -242,7 +242,7 @@ static int my_cfsetspeed(struct termios
- 	 * -- we have to bypass glibc and set the speed manually (because glibc
- 	 *    checks for speed and supports Bxxx bit rates only)...
- 	 */
--#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
-+#if _HAVE_STRUCT_TERMIOS_C_ISPEED
- # define BOTHER 0010000		/* non standard rate */
- 	dbg("using non-standard speeds");
- 	ts->c_ospeed = ts->c_ispeed = speed;
diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.33.2.bb b/poky/meta/recipes-core/util-linux/util-linux_2.33.2.bb
deleted file mode 100644
index 538e276..0000000
--- a/poky/meta/recipes-core/util-linux/util-linux_2.33.2.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require util-linux.inc
-
-SRC_URI += "file://configure-sbindir.patch \
-            file://runuser.pamd \
-            file://runuser-l.pamd \
-            file://ptest.patch \
-            file://run-ptest \
-            file://display_testname_for_subtest.patch \
-            file://avoid_parallel_tests.patch \
-            file://check-for-_HAVE_STRUCT_TERMIOS_C_OSPEED.patch \
-"
-SRC_URI[md5sum] = "91653b90fcbe9c161153e39b8cc69fb5"
-SRC_URI[sha256sum] = "631be8eac6cf6230ba478de211941d526808dba3cd436380793334496013ce97"
diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.34.bb b/poky/meta/recipes-core/util-linux/util-linux_2.34.bb
new file mode 100644
index 0000000..262f4ba
--- /dev/null
+++ b/poky/meta/recipes-core/util-linux/util-linux_2.34.bb
@@ -0,0 +1,12 @@
+require util-linux.inc
+
+SRC_URI += "file://configure-sbindir.patch \
+            file://runuser.pamd \
+            file://runuser-l.pamd \
+            file://ptest.patch \
+            file://run-ptest \
+            file://display_testname_for_subtest.patch \
+            file://avoid_parallel_tests.patch \
+"
+SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
+SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
diff --git a/poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb b/poky/meta/recipes-devtools/apt/apt-native_1.2.31.bb
similarity index 100%
rename from poky/meta/recipes-devtools/apt/apt-native_1.2.24.bb
rename to poky/meta/recipes-devtools/apt/apt-native_1.2.31.bb
diff --git a/poky/meta/recipes-devtools/apt/apt.inc b/poky/meta/recipes-devtools/apt/apt.inc
index 842c302..b855099 100644
--- a/poky/meta/recipes-devtools/apt/apt.inc
+++ b/poky/meta/recipes-devtools/apt/apt.inc
@@ -15,8 +15,8 @@
            file://0001-apt-1.2.12-Fix-musl-build.patch \
            file://0001-Include-array.h-for-std-array.patch \
            "
-SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0"
-SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598"
+SRC_URI[md5sum] = "d30eed9304e82ea8238c854b5c5a34d9"
+SRC_URI[sha256sum] = "03ded4f5e9b8d43ecec083704b2dcabf20c182ed382db9ac7251da0b0b038059"
 LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 # the package is taken from snapshots.debian.org; that source is static and goes stale
diff --git a/poky/meta/recipes-devtools/apt/apt_1.2.24.bb b/poky/meta/recipes-devtools/apt/apt_1.2.31.bb
similarity index 100%
rename from poky/meta/recipes-devtools/apt/apt_1.2.24.bb
rename to poky/meta/recipes-devtools/apt/apt_1.2.31.bb
diff --git a/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2018.03.13.bb b/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb
similarity index 78%
rename from poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2018.03.13.bb
rename to poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb
index 7d62e52..985a254 100644
--- a/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2018.03.13.bb
+++ b/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2019.01.06.bb
@@ -6,8 +6,8 @@
     file://COPYING.EXCEPTION;md5=fdef168ebff3bc2f13664c365a5fb515"
 
 SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "46b13a5936372297b6d49980327a3c35"
-SRC_URI[sha256sum] = "6175f90d9fa64c4d939bdbb3e8511ae0ee2134863a2c7bf8d9733819efa6e159"
+SRC_URI[md5sum] = "d46413c8b00a125b1529bae385bbec55"
+SRC_URI[sha256sum] = "17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f"
 
 inherit autotools allarch
 
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.32.inc b/poky/meta/recipes-devtools/binutils/binutils-2.32.inc
index 49e6827..31c24a3 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.32.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.32.inc
@@ -48,6 +48,8 @@
      file://CVE-2019-9075.patch \
      file://CVE-2019-9076.patch \
      file://CVE-2019-9077.patch \
+     file://CVE-2019-9071.patch \
+     file://CVE-2019-12972.patch \
 "
 S  = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch
new file mode 100644
index 0000000..07d1d65
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-12972.patch
@@ -0,0 +1,51 @@
+From 30bcc01478433a1cb05b36dc5c4beef7d2c89b5b Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Fri, 21 Jun 2019 11:51:38 +0930
+Subject: [PATCH] PR24689, string table corruption
+
+The testcase in the PR had a e_shstrndx section of type SHT_GROUP.
+hdr->contents were initialized by setup_group rather than being read
+from the file, thus last byte was not zero and string dereference ran
+off the end of the buffer.
+
+	PR 24689
+	* elfcode.h (elf_object_p): Check type of e_shstrndx section.
+
+Upstream-Status: Backport
+CVE: CVE-2019-12972
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ bfd/ChangeLog | 5 +++++
+ bfd/elfcode.h | 3 ++-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/bfd/ChangeLog b/bfd/ChangeLog
+index 91f09e6346..e66fb40a2c 100644
+--- a/bfd/ChangeLog
++++ b/bfd/ChangeLog
+@@ -1,3 +1,8 @@
++2019-06-21  Alan Modra  <amodra@gmail.com>
++
++	PR 24689
++	* elfcode.h (elf_object_p): Check type of e_shstrndx section.
++
+ 2019-02-20  Alan Modra  <amodra@gmail.com>
+ 
+ 	PR 24236
+diff --git a/bfd/elfcode.h b/bfd/elfcode.h
+index ec5ea766de..a35a629087 100644
+--- a/bfd/elfcode.h
++++ b/bfd/elfcode.h
+@@ -755,7 +755,8 @@ elf_object_p (bfd *abfd)
+   /* A further sanity check.  */
+   if (i_ehdrp->e_shnum != 0)
+     {
+-      if (i_ehdrp->e_shstrndx >= elf_numsections (abfd))
++      if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)
++	  || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB)
+ 	{
+ 	  /* PR 2257:
+ 	     We used to just goto got_wrong_format_error here
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9071.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9071.patch
new file mode 100644
index 0000000..f025399
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-9071.patch
@@ -0,0 +1,165 @@
+From c1202057eb9161a86af27d867703235fee7b7555 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Wed, 10 Apr 2019 15:49:36 +0100
+Subject: [PATCH] Pull in patch for libiberty that fixes a stack exhaustion bug
+ when demangling a pathalogically constructed mangled name.
+
+	PR 89394
+	* cp-demangle.c (cplus_demangle_fill_name): Reject negative
+	lengths.
+	(d_count_templates_scopes): Replace num_templates and num_scopes
+	parameters with a struct d_print_info pointer parameter.  Adjust
+	body of the function accordingly.  Add recursion counter and check
+	that the recursion limit is not reached.
+	(d_print_init): Pass dpi parameter to d_count_templates_scopes.
+	Reset recursion counter afterwards, unless the recursion limit was
+	reached.
+
+CVE: CVE-2019-9071
+CVE: CVE-2019-9070
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ ChangeLog               | 16 ++++++++++++++
+ libiberty/cp-demangle.c | 48 ++++++++++++++++++++++-------------------
+ 2 files changed, 42 insertions(+), 22 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index cd631a15b6..4df3aaa62c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,19 @@
++2019-04-10  Nick Clifton  <nickc@redhat.com>
++
++	* libiberty: Sync with gcc.  Bring in:
++	2019-04-10  Nick Clifton  <nickc@redhat.com>
++
++	PR 89394
++	* cp-demangle.c (cplus_demangle_fill_name): Reject negative
++	lengths.
++	(d_count_templates_scopes): Replace num_templates and num_scopes
++	parameters with a struct d_print_info pointer parameter.  Adjust
++	body of the function accordingly.  Add recursion counter and check
++	that the recursion limit is not reached.
++	(d_print_init): Pass dpi parameter to d_count_templates_scopes.
++	Reset recursion counter afterwards, unless the recursion limit was
++	reached.
++
+ 2018-06-24  Nick Clifton  <nickc@redhat.com>
+ 
+ 	2.32 branch created.
+diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
+index b34b485692..779b4e763a 100644
+--- a/libiberty/cp-demangle.c
++++ b/libiberty/cp-demangle.c
+@@ -861,7 +861,7 @@ CP_STATIC_IF_GLIBCPP_V3
+ int
+ cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len)
+ {
+-  if (p == NULL || s == NULL || len == 0)
++  if (p == NULL || s == NULL || len <= 0)
+     return 0;
+   p->d_printing = 0;
+   p->type = DEMANGLE_COMPONENT_NAME;
+@@ -4061,7 +4061,7 @@ d_growable_string_callback_adapter (const char *s, size_t l, void *opaque)
+    are larger than the actual numbers encountered.  */
+ 
+ static void
+-d_count_templates_scopes (int *num_templates, int *num_scopes,
++d_count_templates_scopes (struct d_print_info *dpi,
+ 			  const struct demangle_component *dc)
+ {
+   if (dc == NULL)
+@@ -4081,13 +4081,13 @@ d_count_templates_scopes (int *num_templates, int *num_scopes,
+       break;
+ 
+     case DEMANGLE_COMPONENT_TEMPLATE:
+-      (*num_templates)++;
++      dpi->num_copy_templates++;
+       goto recurse_left_right;
+ 
+     case DEMANGLE_COMPONENT_REFERENCE:
+     case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
+       if (d_left (dc)->type == DEMANGLE_COMPONENT_TEMPLATE_PARAM)
+-	(*num_scopes)++;
++	dpi->num_saved_scopes++;
+       goto recurse_left_right;
+ 
+     case DEMANGLE_COMPONENT_QUAL_NAME:
+@@ -4152,42 +4152,42 @@ d_count_templates_scopes (int *num_templates, int *num_scopes,
+     case DEMANGLE_COMPONENT_TAGGED_NAME:
+     case DEMANGLE_COMPONENT_CLONE:
+     recurse_left_right:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				d_left (dc));
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				d_right (dc));
++      /* PR 89394 - Check for too much recursion.  */
++      if (dpi->recursion > DEMANGLE_RECURSION_LIMIT)
++	/* FIXME: There ought to be a way to report to the
++	   user that the recursion limit has been reached.  */
++	return;
++
++      ++ dpi->recursion;
++      d_count_templates_scopes (dpi, d_left (dc));
++      d_count_templates_scopes (dpi, d_right (dc));
++      -- dpi->recursion;
+       break;
+ 
+     case DEMANGLE_COMPONENT_CTOR:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				dc->u.s_ctor.name);
++      d_count_templates_scopes (dpi, dc->u.s_ctor.name);
+       break;
+ 
+     case DEMANGLE_COMPONENT_DTOR:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				dc->u.s_dtor.name);
++      d_count_templates_scopes (dpi, dc->u.s_dtor.name);
+       break;
+ 
+     case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				dc->u.s_extended_operator.name);
++      d_count_templates_scopes (dpi, dc->u.s_extended_operator.name);
+       break;
+ 
+     case DEMANGLE_COMPONENT_FIXED_TYPE:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-                                dc->u.s_fixed.length);
++      d_count_templates_scopes (dpi, dc->u.s_fixed.length);
+       break;
+ 
+     case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS:
+     case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				d_left (dc));
++      d_count_templates_scopes (dpi, d_left (dc));
+       break;
+ 
+     case DEMANGLE_COMPONENT_LAMBDA:
+     case DEMANGLE_COMPONENT_DEFAULT_ARG:
+-      d_count_templates_scopes (num_templates, num_scopes,
+-				dc->u.s_unary_num.sub);
++      d_count_templates_scopes (dpi, dc->u.s_unary_num.sub);
+       break;
+     }
+ }
+@@ -4222,8 +4222,12 @@ d_print_init (struct d_print_info *dpi, demangle_callbackref callback,
+   dpi->next_copy_template = 0;
+   dpi->num_copy_templates = 0;
+ 
+-  d_count_templates_scopes (&dpi->num_copy_templates,
+-			    &dpi->num_saved_scopes, dc);
++  d_count_templates_scopes (dpi, dc);
++  /* If we did not reach the recursion limit, then reset the
++     current recursion value back to 0, so that we can print
++     the templates.  */
++  if (dpi->recursion < DEMANGLE_RECURSION_LIMIT)
++    dpi->recursion = 0;
+   dpi->num_copy_templates *= dpi->num_saved_scopes;
+ 
+   dpi->current_template = NULL;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/bison/bison_3.3.2.bb b/poky/meta/recipes-devtools/bison/bison_3.4.1.bb
similarity index 90%
rename from poky/meta/recipes-devtools/bison/bison_3.3.2.bb
rename to poky/meta/recipes-devtools/bison/bison_3.4.1.bb
index adb9d48..7946e20 100644
--- a/poky/meta/recipes-devtools/bison/bison_3.3.2.bb
+++ b/poky/meta/recipes-devtools/bison/bison_3.4.1.bb
@@ -17,8 +17,8 @@
 # No point in hardcoding path to m4, just use PATH
 EXTRA_OECONF += "M4=m4"
 
-SRC_URI[md5sum] = "c9b552dee234b2f6b66e56b27e5234c9"
-SRC_URI[sha256sum] = "039ee45b61d95e5003e7e8376f9080001b4066ff357bde271b7faace53b9d804"
+SRC_URI[md5sum] = "201286a573b12da109df96282fe4ff4a"
+SRC_URI[sha256sum] = "27159ac5ebf736dffd5636fd2cd625767c9e437de65baa63cb0de83570bd820d"
 
 inherit autotools gettext texinfo
 
diff --git a/poky/meta/recipes-devtools/cmake/cmake-native_3.14.1.bb b/poky/meta/recipes-devtools/cmake/cmake-native_3.14.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cmake/cmake-native_3.14.1.bb
rename to poky/meta/recipes-devtools/cmake/cmake-native_3.14.5.bb
diff --git a/poky/meta/recipes-devtools/cmake/cmake.inc b/poky/meta/recipes-devtools/cmake/cmake.inc
index 5b0bce6..da3aadc 100644
--- a/poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/poky/meta/recipes-devtools/cmake/cmake.inc
@@ -18,7 +18,7 @@
            file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \
 "
 
-SRC_URI[md5sum] = "7efe5394e85c3292ad020b8b70e55669"
-SRC_URI[sha256sum] = "7321be640406338fc12590609c42b0fae7ea12980855c1be363d25dcd76bb25f"
+SRC_URI[md5sum] = "a8cbfc3510b95ea686b4059d8b1f765c"
+SRC_URI[sha256sum] = "505ae49ebe3c63c595fa5f814975d8b72848447ee13b6613b0f8b96ebda18c06"
 
 UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/poky/meta/recipes-devtools/cmake/cmake_3.14.1.bb b/poky/meta/recipes-devtools/cmake/cmake_3.14.5.bb
similarity index 100%
rename from poky/meta/recipes-devtools/cmake/cmake_3.14.1.bb
rename to poky/meta/recipes-devtools/cmake/cmake_3.14.5.bb
diff --git a/poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
deleted file mode 100644
index 1c84fb1..0000000
--- a/poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
+++ /dev/null
@@ -1,62 +0,0 @@
-SUMMARY = "cve-check-tool"
-DESCRIPTION = "cve-check-tool is a tool for checking known (public) CVEs.\
-The tool will identify potentially vunlnerable software packages within Linux distributions through version matching."
-HOMEPAGE = "https://github.com/ikeydoherty/cve-check-tool"
-SECTION = "Development/Tools"
-LICENSE = "GPL-2.0+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e8c1458438ead3c34974bc0be3a03ed6"
-
-SRC_URI = "https://github.com/ikeydoherty/${BPN}/releases/download/v${PV}/${BP}.tar.xz \
-           file://check-for-malloc_trim-before-using-it.patch \
-           file://0001-print-progress-in-percent-when-downloading-CVE-db.patch \
-           file://0001-curl-allow-overriding-default-CA-certificate-file.patch \
-           file://0001-update-Compare-computed-vs-expected-sha256-digit-str.patch \
-           file://0001-Fix-freeing-memory-allocated-by-sqlite.patch \
-          "
-
-SRC_URI[md5sum] = "c5f4247140fc9be3bf41491d31a34155"
-SRC_URI[sha256sum] = "b8f283be718af8d31232ac1bfc10a0378fb958aaaa49af39168f8acf501e6a5b"
-
-UPSTREAM_CHECK_URI = "https://github.com/ikeydoherty/cve-check-tool/releases"
-
-DEPENDS = "libcheck glib-2.0 json-glib curl libxml2 sqlite3 openssl ca-certificates"
-
-RDEPENDS_${PN} = "ca-certificates"
-
-inherit pkgconfig autotools
-
-EXTRA_OECONF = "--disable-coverage --enable-relative-plugins"
-CFLAGS_append = " -Wno-error=pedantic"
-
-do_populate_cve_db() {
-    if [ "${BB_NO_NETWORK}" = "1" ] ; then
-        bbwarn "BB_NO_NETWORK is set; Can't update cve-check-tool database, new CVEs won't be detected"
-        return
-    fi
-
-    # In case we don't inherit cve-check class, use default values defined in the class.
-    cve_dir="${CVE_CHECK_DB_DIR}"
-    cve_file="${CVE_CHECK_TMP_FILE}"
-
-    [ -z "${cve_dir}" ] && cve_dir="${DL_DIR}/CVE_CHECK"
-    [ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
-
-    unused="${@bb.utils.export_proxies(d)}"
-    bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
-    # --cacert works around curl-native not finding the CA bundle
-    if cve-check-update --cacert ${sysconfdir}/ssl/certs/ca-certificates.crt -d "$cve_dir" ; then
-        printf "CVE database was updated on %s UTC\n\n" "$(LANG=C date --utc +'%F %T')" > "$cve_file"
-    else
-        bbwarn "Error in executing cve-check-update"
-        if [ "${@'1' if bb.data.inherits_class('cve-check', d) else '0'}" -ne 0 ] ; then
-            bbwarn "Failed to update cve-check-tool database, CVEs won't be checked"
-        fi
-    fi
-}
-
-addtask populate_cve_db after do_populate_sysroot
-do_populate_cve_db[depends] = "cve-check-tool-native:do_populate_sysroot"
-do_populate_cve_db[nostamp] = "1"
-do_populate_cve_db[progress] = "percent"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch b/poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch
deleted file mode 100644
index 4a82cf2..0000000
--- a/poky/meta/recipes-devtools/cve-check-tool/files/0001-Fix-freeing-memory-allocated-by-sqlite.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From a3353429652f83bb8b0316500faa88fa2555542d Mon Sep 17 00:00:00 2001
-From: Peter Marko <peter.marko@siemens.com>
-Date: Thu, 13 Apr 2017 23:09:52 +0200
-Subject: [PATCH] Fix freeing memory allocated by sqlite
-
-Upstream-Status: Backport
-Signed-off-by: Peter Marko <peter.marko@siemens.com>
----
- src/core.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/core.c b/src/core.c
-index 6263031..6788f16 100644
---- a/src/core.c
-+++ b/src/core.c
-@@ -82,7 +82,7 @@ static bool ensure_table(CveDB *self)
-         rc = sqlite3_exec(self->db, query, NULL, NULL, &err);
-         if (rc != SQLITE_OK) {
-                 fprintf(stderr, "ensure_table(): %s\n", err);
--                free(err);
-+                sqlite3_free(err);
-                 return false;
-         }
-         
-@@ -91,7 +91,7 @@ static bool ensure_table(CveDB *self)
-         rc = sqlite3_exec(self->db, query, NULL, NULL, &err);
-         if (rc != SQLITE_OK) {
-                 fprintf(stderr, "ensure_table(): %s\n", err);
--                free(err);
-+                sqlite3_free(err);
-                 return false;
-         }
- 
-@@ -99,11 +99,11 @@ static bool ensure_table(CveDB *self)
-         rc = sqlite3_exec(self->db, query, NULL, NULL, &err);
-         if (rc != SQLITE_OK) {
-                 fprintf(stderr, "ensure_table(): %s\n", err);
--                free(err);
-+                sqlite3_free(err);
-                 return false;
-         }
-         if (err) {
--                free(err);
-+                sqlite3_free(err);
-         }
- 
-         return true;
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/cve-check-tool/files/0001-curl-allow-overriding-default-CA-certificate-file.patch b/poky/meta/recipes-devtools/cve-check-tool/files/0001-curl-allow-overriding-default-CA-certificate-file.patch
deleted file mode 100644
index 3d8ebd1..0000000
--- a/poky/meta/recipes-devtools/cve-check-tool/files/0001-curl-allow-overriding-default-CA-certificate-file.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 825a9969dea052b02ba868bdf39e676349f10dce Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Thu, 9 Feb 2017 14:51:28 +0200
-Subject: [PATCH] curl: allow overriding default CA certificate file
-
-Similar to curl, --cacert can now be used in cve-check-tool and
-cve-check-update to override the default CA certificate file. Useful
-in cases where the system default is unsuitable (for example,
-out-dated) or broken (as in OE's current native libcurl, which embeds
-a path string from one build host and then uses it on another although
-the right path may have become something different).
-
-Upstream-Status: Submitted [https://github.com/ikeydoherty/cve-check-tool/pull/45]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-
-
-Took Patrick Ohlys original patch from meta-security-isafw, rebased
-on top of other patches.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- src/library/cve-check-tool.h |  1 +
- src/library/fetch.c          | 10 +++++++++-
- src/library/fetch.h          |  3 ++-
- src/main.c                   |  5 ++++-
- src/update-main.c            |  4 +++-
- src/update.c                 | 12 +++++++-----
- src/update.h                 |  2 +-
- 7 files changed, 27 insertions(+), 10 deletions(-)
-
-diff --git a/src/library/cve-check-tool.h b/src/library/cve-check-tool.h
-index e4bb5b1..f89eade 100644
---- a/src/library/cve-check-tool.h
-+++ b/src/library/cve-check-tool.h
-@@ -43,6 +43,7 @@ typedef struct CveCheckTool {
-     bool bugs;                          /**<Whether bug tracking is enabled */
-     GHashTable *mapping;                /**<CVE Mapping */
-     const char *output_file;            /**<Output file, if any */
-+    const char *cacert_file;            /**<Non-default SSL certificate file, if any */
- } CveCheckTool;
- 
- /**
-diff --git a/src/library/fetch.c b/src/library/fetch.c
-index 0fe6d76..8f998c3 100644
---- a/src/library/fetch.c
-+++ b/src/library/fetch.c
-@@ -60,7 +60,8 @@ static int progress_callback_new(void *ptr, curl_off_t dltotal, curl_off_t dlnow
- }
- 
- FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
--                      unsigned int start_percent, unsigned int end_percent)
-+                      unsigned int start_percent, unsigned int end_percent,
-+                      const char *cacert_file)
- {
-         FetchStatus ret = FETCH_STATUS_FAIL;
-         CURLcode res;
-@@ -74,6 +75,13 @@ FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
-                 return ret;
-         }
- 
-+        if (cacert_file) {
-+                res = curl_easy_setopt(curl, CURLOPT_CAINFO, cacert_file);
-+                if (res != CURLE_OK) {
-+                        goto bail;
-+                }
-+        }
-+
-         if (stat(target, &st) == 0) {
-                 res = curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
-                 if (res != CURLE_OK) {
-diff --git a/src/library/fetch.h b/src/library/fetch.h
-index 4cce5d1..836c7d7 100644
---- a/src/library/fetch.h
-+++ b/src/library/fetch.h
-@@ -29,7 +29,8 @@ typedef enum {
-  * @return A FetchStatus, indicating the operation taken
-  */
- FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
--                      unsigned int this_percent, unsigned int next_percent);
-+                      unsigned int this_percent, unsigned int next_percent,
-+                      const char *cacert_file);
- 
- /**
-  * Attempt to extract the given gzipped file
-diff --git a/src/main.c b/src/main.c
-index 8e6f158..ae69d47 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -280,6 +280,7 @@ static bool csv_mode = false;
- static char *modified_stamp = NULL;
- static gchar *mapping_file = NULL;
- static gchar *output_file = NULL;
-+static gchar *cacert_file = NULL;
- 
- static GOptionEntry _entries[] = {
-         { "not-patched", 'n', 0, G_OPTION_ARG_NONE, &hide_patched, "Hide patched/addressed CVEs", NULL },
-@@ -294,6 +295,7 @@ static GOptionEntry _entries[] = {
-         { "csv", 'c', 0, G_OPTION_ARG_NONE, &csv_mode, "Output CSV formatted data only", NULL },
-         { "mapping", 'M', 0, G_OPTION_ARG_STRING, &mapping_file, "Path to a mapping file", NULL},
-         { "output-file", 'o', 0, G_OPTION_ARG_STRING, &output_file, "Path to the output file (output plugin specific)", NULL},
-+        { "cacert", 'C', 0, G_OPTION_ARG_STRING, &cacert_file, "Path to the combined SSL certificates file (system default is used if not set)", NULL},
-         { .short_name = 0 }
- };
- 
-@@ -492,6 +494,7 @@ int main(int argc, char **argv)
- 
-         quiet = csv_mode || !no_html;
-         self->output_file = output_file;
-+        self->cacert_file = cacert_file;
- 
-         if (!csv_mode && self->output_file) {
-                 quiet = false;
-@@ -530,7 +533,7 @@ int main(int argc, char **argv)
-                 if (status) {
-                         fprintf(stderr, "Update of db forced\n");
-                         cve_db_unlock();
--                        if (!update_db(quiet, db_path->str)) {
-+                        if (!update_db(quiet, db_path->str, self->cacert_file)) {
-                                 fprintf(stderr, "DB update failure\n");
-                                 goto cleanup;
-                         }
-diff --git a/src/update-main.c b/src/update-main.c
-index 2379cfa..c52d9d0 100644
---- a/src/update-main.c
-+++ b/src/update-main.c
-@@ -43,11 +43,13 @@ the Free Software Foundation; either version 2 of the License, or\n\
- static gchar *nvds = NULL;
- static bool _show_version = false;
- static bool _quiet = false;
-+static const char *_cacert_file = NULL;
- 
- static GOptionEntry _entries[] = {
-         { "nvd-dir", 'd', 0, G_OPTION_ARG_STRING, &nvds, "NVD directory in filesystem", NULL },
-         { "version", 'v', 0, G_OPTION_ARG_NONE, &_show_version, "Show version", NULL },
-         { "quiet", 'q', 0, G_OPTION_ARG_NONE, &_quiet, "Run silently", NULL },
-+        { "cacert", 'C', 0, G_OPTION_ARG_STRING, &_cacert_file, "Path to the combined SSL certificates file (system default is used if not set)", NULL},
-         { .short_name = 0 }
- };
- 
-@@ -88,7 +90,7 @@ int main(int argc, char **argv)
-                 goto end;
-         }
- 
--        if (update_db(_quiet, db_path->str)) {
-+        if (update_db(_quiet, db_path->str, _cacert_file)) {
-                 ret = EXIT_SUCCESS;
-         } else {
-                 fprintf(stderr, "Failed to update database\n");
-diff --git a/src/update.c b/src/update.c
-index 070560a..8cb4a39 100644
---- a/src/update.c
-+++ b/src/update.c
-@@ -267,7 +267,8 @@ static inline void update_end(int fd, const char *update_fname, bool ok)
- 
- static int do_fetch_update(int year, const char *db_dir, CveDB *cve_db,
-                            bool db_exist, bool verbose,
--                           unsigned int this_percent, unsigned int next_percent)
-+                           unsigned int this_percent, unsigned int next_percent,
-+                           const char *cacert_file)
- {
-         const char nvd_uri[] = URI_PREFIX;
-         autofree(cve_string) *uri_meta = NULL;
-@@ -331,14 +332,14 @@ refetch:
-         }
- 
-         /* Fetch NVD META file */
--        st = fetch_uri(uri_meta->str, nvdcve_meta->str, verbose, this_percent, this_percent);
-+        st = fetch_uri(uri_meta->str, nvdcve_meta->str, verbose, this_percent, this_percent, cacert_file);
-         if (st == FETCH_STATUS_FAIL) {
-                 fprintf(stderr, "Failed to fetch %s\n", uri_meta->str);
-                 return -1;
-         }
- 
-         /* Fetch NVD XML file */
--        st = fetch_uri(uri_data_gz->str, nvdcve_data_gz->str, verbose, this_percent, next_percent);
-+        st = fetch_uri(uri_data_gz->str, nvdcve_data_gz->str, verbose, this_percent, next_percent, cacert_file);
-         switch (st) {
-         case FETCH_STATUS_FAIL:
-                 fprintf(stderr, "Failed to fetch %s\n", uri_data_gz->str);
-@@ -391,7 +392,7 @@ refetch:
-         return 0;
- }
- 
--bool update_db(bool quiet, const char *db_file)
-+bool update_db(bool quiet, const char *db_file, const char *cacert_file)
- {
-         autofree(char) *db_dir = NULL;
-         autofree(CveDB) *cve_db = NULL;
-@@ -466,7 +467,8 @@ bool update_db(bool quiet, const char *db_file)
-                 if (!quiet)
-                         fprintf(stderr, "completed: %u%%\r", start_percent);
-                 rc = do_fetch_update(y, db_dir, cve_db, db_exist, !quiet,
--                                     start_percent, end_percent);
-+                                     start_percent, end_percent,
-+                                     cacert_file);
-                 switch (rc) {
-                 case 0:
-                         if (!quiet)
-diff --git a/src/update.h b/src/update.h
-index b8e9911..ceea0c3 100644
---- a/src/update.h
-+++ b/src/update.h
-@@ -15,7 +15,7 @@ cve_string *get_db_path(const char *path);
- 
- int update_required(const char *db_file);
- 
--bool update_db(bool quiet, const char *db_file);
-+bool update_db(bool quiet, const char *db_file, const char *cacert_file);
- 
- 
- /*
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch b/poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
deleted file mode 100644
index 8ea6f68..0000000
--- a/poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From e9ed26cde63f8ca7607a010a518329339f8c02d3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
-Date: Mon, 26 Sep 2016 12:12:41 +0100
-Subject: [PATCH] print progress in percent when downloading CVE db
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Pending
-Signed-off-by: André Draszik <git@andred.net>
----
- src/library/fetch.c | 28 +++++++++++++++++++++++++++-
- src/library/fetch.h |  3 ++-
- src/update.c        | 16 ++++++++++++----
- 3 files changed, 41 insertions(+), 6 deletions(-)
-
-diff --git a/src/library/fetch.c b/src/library/fetch.c
-index 06d4b30..0fe6d76 100644
---- a/src/library/fetch.c
-+++ b/src/library/fetch.c
-@@ -37,13 +37,37 @@ static size_t write_func(void *ptr, size_t size, size_t nmemb, struct fetch_t *f
-         return fwrite(ptr, size, nmemb, f->f);
- }
- 
--FetchStatus fetch_uri(const char *uri, const char *target, bool verbose)
-+struct percent_t {
-+        unsigned int start;
-+        unsigned int end;
-+};
-+
-+static int progress_callback_new(void *ptr, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
-+{
-+        (void) ultotal;
-+        (void) ulnow;
-+
-+        struct percent_t *percent = (struct percent_t *) ptr;
-+
-+        if (dltotal && percent && percent->end >= percent->start) {
-+                unsigned int diff = percent->end - percent->start;
-+                if (diff) {
-+                        fprintf(stderr,"completed: %"CURL_FORMAT_CURL_OFF_T"%%\r", percent->start + (diff * dlnow / dltotal));
-+                }
-+        }
-+
-+        return 0;
-+}
-+
-+FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
-+                      unsigned int start_percent, unsigned int end_percent)
- {
-         FetchStatus ret = FETCH_STATUS_FAIL;
-         CURLcode res;
-         struct stat st;
-         CURL *curl = NULL;
-         struct fetch_t *f = NULL;
-+        struct percent_t percent = { .start = start_percent, .end = end_percent };
- 
-         curl = curl_easy_init();
-         if (!curl) {
-@@ -67,6 +91,8 @@ FetchStatus fetch_uri(const char *uri, const char *target, bool verbose)
-         }
-         if (verbose) {
-                 (void)curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
-+                (void)curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &percent);
-+                (void)curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback_new);
-         }
-         res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)write_func);
-         if (res != CURLE_OK) {
-diff --git a/src/library/fetch.h b/src/library/fetch.h
-index 70c3779..4cce5d1 100644
---- a/src/library/fetch.h
-+++ b/src/library/fetch.h
-@@ -28,7 +28,8 @@ typedef enum {
-  * @param verbose Whether to be verbose
-  * @return A FetchStatus, indicating the operation taken
-  */
--FetchStatus fetch_uri(const char *uri, const char *target, bool verbose);
-+FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
-+                      unsigned int this_percent, unsigned int next_percent);
- 
- /**
-  * Attempt to extract the given gzipped file
-diff --git a/src/update.c b/src/update.c
-index 30fbe96..eaeeefd 100644
---- a/src/update.c
-+++ b/src/update.c
-@@ -266,7 +266,8 @@ static inline void update_end(int fd, const char *update_fname, bool ok)
- }
- 
- static int do_fetch_update(int year, const char *db_dir, CveDB *cve_db,
--                           bool db_exist, bool verbose)
-+                           bool db_exist, bool verbose,
-+                           unsigned int this_percent, unsigned int next_percent)
- {
-         const char nvd_uri[] = URI_PREFIX;
-         autofree(cve_string) *uri_meta = NULL;
-@@ -330,14 +331,14 @@ refetch:
-         }
- 
-         /* Fetch NVD META file */
--        st = fetch_uri(uri_meta->str, nvdcve_meta->str, verbose);
-+        st = fetch_uri(uri_meta->str, nvdcve_meta->str, verbose, this_percent, this_percent);
-         if (st == FETCH_STATUS_FAIL) {
-                 fprintf(stderr, "Failed to fetch %s\n", uri_meta->str);
-                 return -1;
-         }
- 
-         /* Fetch NVD XML file */
--        st = fetch_uri(uri_data_gz->str, nvdcve_data_gz->str, verbose);
-+        st = fetch_uri(uri_data_gz->str, nvdcve_data_gz->str, verbose, this_percent, next_percent);
-         switch (st) {
-         case FETCH_STATUS_FAIL:
-                 fprintf(stderr, "Failed to fetch %s\n", uri_data_gz->str);
-@@ -459,10 +460,17 @@ bool update_db(bool quiet, const char *db_file)
-         for (int i = YEAR_START; i <= year+1; i++) {
-                 int y = i > year ? -1 : i;
-                 int rc;
-+                unsigned int start_percent = ((i+0 - YEAR_START) * 100) / (year+2 - YEAR_START);
-+                unsigned int end_percent = ((i+1 - YEAR_START) * 100) / (year+2 - YEAR_START);
- 
--                rc = do_fetch_update(y, db_dir, cve_db, db_exist, !quiet);
-+                if (!quiet)
-+                        fprintf(stderr, "completed: %u%%\r", start_percent);
-+                rc = do_fetch_update(y, db_dir, cve_db, db_exist, !quiet,
-+                                     start_percent, end_percent);
-                 switch (rc) {
-                 case 0:
-+                        if (!quiet)
-+                                fprintf(stderr,"completed: %u%%\r", end_percent);
-                         continue;
-                 case ENOMEM:
-                         goto oom;
--- 
-2.9.3
-
diff --git a/poky/meta/recipes-devtools/cve-check-tool/files/0001-update-Compare-computed-vs-expected-sha256-digit-str.patch b/poky/meta/recipes-devtools/cve-check-tool/files/0001-update-Compare-computed-vs-expected-sha256-digit-str.patch
deleted file mode 100644
index 458c0cc..0000000
--- a/poky/meta/recipes-devtools/cve-check-tool/files/0001-update-Compare-computed-vs-expected-sha256-digit-str.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From b0426e63c9ac61657e029f689bcb8dd051e752c6 Mon Sep 17 00:00:00 2001
-From: Sergey Popovich <popovich_sergei@mail.ua>
-Date: Fri, 21 Apr 2017 07:32:23 -0700
-Subject: [PATCH] update: Compare computed vs expected sha256 digit string
- ignoring case
-
-We produce sha256 digest string using %x snprintf()
-qualifier for each byte of digest which uses alphabetic
-characters from "a" to "f" in lower case to represent
-integer values from 10 to 15.
-
-Previously all of the NVD META files supply sha256
-digest string for corresponding XML file in lower case.
-
-However due to some reason this changed recently to
-provide digest digits in upper case causing fetched
-data consistency checks to fail. This prevents database
-from being updated periodically.
-
-While commit c4f6e94 (update: Do not treat sha256 failure
-as fatal if requested) adds useful option to skip
-digest validation at all and thus provides workaround for
-this situation, it might be unacceptable for some
-deployments where we need to ensure that downloaded
-data is consistent before start parsing it and update
-SQLite database.
-
-Use strcasecmp() to compare two digest strings case
-insensitively and addressing this case.
-
-Upstream-Status: Backport
-Signed-off-by: Sergey Popovich <popovich_sergei@mail.ua>
----
- src/update.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/update.c b/src/update.c
-index 8588f38..3cc6b67 100644
---- a/src/update.c
-+++ b/src/update.c
-@@ -187,7 +187,7 @@ static bool nvdcve_data_ok(const char *meta, const char *data)
-                 snprintf(&csum_data[idx], len, "%02hhx", digest[i]);
-         }
- 
--        ret = streq(csum_meta, csum_data);
-+        ret = !strcasecmp(csum_meta, csum_data);
- 
- err_unmap:
-         munmap(buffer, length);
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch b/poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch
deleted file mode 100644
index 0774ad9..0000000
--- a/poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From ce64633b9733e962b8d8482244301f614d8b5845 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 22 Aug 2016 22:54:24 -0700
-Subject: [PATCH] Check for malloc_trim before using it
-
-malloc_trim is gnu specific and not all libc
-implement it, threfore write a configure check
-to poke for it first and use the define to
-guard its use.
-
-Helps in compiling on musl based systems
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted [https://github.com/ikeydoherty/cve-check-tool/pull/48]
- configure.ac | 2 ++
- src/core.c   | 4 ++--
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index d3b66ce..79c3542 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -19,6 +19,8 @@ m4_define([json_required_version], [0.16.0])
- m4_define([openssl_required_version],[1.0.0])
- # TODO: Set minimum sqlite
- 
-+AC_CHECK_FUNCS_ONCE(malloc_trim)
-+
- PKG_CHECK_MODULES(CVE_CHECK_TOOL,
-                  [
-                   glib-2.0 >= glib_required_version,
-diff --git a/src/core.c b/src/core.c
-index 6263031..0d5df29 100644
---- a/src/core.c
-+++ b/src/core.c
-@@ -498,9 +498,9 @@ bool cve_db_load(CveDB *self, const char *fname)
-         }
- 
-         b = true;
--
-+#ifdef HAVE_MALLOC_TRIM
-         malloc_trim(0);
--
-+#endif
-         xmlFreeTextReader(r);
-         if (fd) {
-                 close(fd);
--- 
-2.9.3
-
diff --git a/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb b/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
index 4b6a28e..6452c8d 100644
--- a/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
+++ b/poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
@@ -8,8 +8,6 @@
 LICENSE = "OASIS"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
 
-DEPENDS = "libxml2-native"
-
 # Note: the upstream sources are not distributed with a license file.
 # LICENSE-OASIS is included as a "patch" to workaround this. When
 # upgrading this recipe, please verify whether this is still needed.
diff --git a/poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb b/poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
index ff38e87..c5d3a24 100644
--- a/poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
+++ b/poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
@@ -14,8 +14,6 @@
 # Reject versions ending in .0 as those are release candidates
 UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
 
-DEPENDS = "libxml2-native"
-
 S = "${WORKDIR}/docbook-xsl-${PV}"
 
 inherit allarch xmlcatalog
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
index b88be87..9ca7262 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
+++ b/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
@@ -1,7 +1,7 @@
-From 24229971492515b64c81e8c6392e5dfbdc22b44c Mon Sep 17 00:00:00 2001
+From dd11ed66640f79143e42d778b58fdd5a61fb5836 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 26 Aug 2015 16:25:45 +0300
-Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
+Subject: [PATCH] Our pre/postinsts expect $D to be set when running in a
  sysroot and don't expect a chroot. This matches up our system expectations
  with what dpkg does.
 
@@ -12,11 +12,11 @@
 ALIMON 2017/02/21
 KKang 2019/02/20
 ---
- src/script.c | 44 +++-----------------------------------------
- 1 file changed, 3 insertions(+), 41 deletions(-)
+ src/script.c | 53 +++-------------------------------------------------
+ 1 file changed, 3 insertions(+), 50 deletions(-)
 
 diff --git a/src/script.c b/src/script.c
-index 0865b95..73ed35d 100644
+index abe65b6f7..621ff9b27 100644
 --- a/src/script.c
 +++ b/src/script.c
 @@ -96,58 +96,11 @@ setexecute(const char *path, struct stat *stab)
@@ -27,12 +27,12 @@
 -	const char *changedir;
 -	size_t instdirlen = strlen(instdir);
 -
--	if (instdirlen > 0 && fc_script_chrootless)
+-	if (instdirlen > 0 && in_force(FORCE_SCRIPT_CHROOTLESS))
 -		changedir = instdir;
 -	else
 -		changedir = "/";
 -
--	if (instdirlen > 0 && !fc_script_chrootless) {
+-	if (instdirlen > 0 && !in_force(FORCE_SCRIPT_CHROOTLESS)) {
 -		int rc;
 -
 -		if (strncmp(admindir, instdir, instdirlen) != 0)
@@ -43,7 +43,7 @@
 -			ohshite(_("unable to setenv for subprocesses"));
 -
 -		rc = chroot(instdir);
--		if (rc && fc_nonroot && errno == EPERM)
+-		if (rc && in_force(FORCE_NON_ROOT) && errno == EPERM)
 -			ohshit(_("not enough privileges to change root "
 -			         "directory with --force-not-root, consider "
 -			         "using --force-script-chrootless?"));
@@ -69,7 +69,7 @@
 -		      args.buf);
 -		varbuf_destroy(&args);
 -	}
--	if (instdirlen == 0 || fc_script_chrootless)
+-	if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS))
 -		return cmd->filename;
 -
 -	if (strlen(cmd->filename) < instdirlen)
@@ -82,5 +82,5 @@
  
  /**
 -- 
-2.1.4
+2.17.1
 
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb b/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb
similarity index 86%
rename from poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
rename to poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb
index b83868f..e9dec33 100644
--- a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
+++ b/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb
@@ -18,5 +18,5 @@
                                 file://tweak-options-require-tar-1.27.patch \
 "
 
-SRC_URI[md5sum] = "1e4420409426d8c58bbe13a8e07c0c0b"
-SRC_URI[sha256sum] = "c15234e98655689586bff2d517a6fdc6135d139c54d52ae9cfa6a90007fee0ae"
+SRC_URI[md5sum] = "60f57c5494e6dfa177504d47bfa0e383"
+SRC_URI[sha256sum] = "4c27fededf620c0aa522fff1a48577ba08144445341257502e7730f2b1a296e8"
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
deleted file mode 100644
index d7e09b6..0000000
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0a392baf1874964651115d9f77b0daa6851d1daa Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Tue, 1 Mar 2016 14:28:01 +1100
-Subject: [PATCH] Revert "mke2fs: enable the metadata_csum and 64bit features
- by default"
-
-This reverts commit cd27af3ecb83e8fd1e3eaa14994284a1818c7c15 as we
-don't want to enable features by default that are not supported by
-the latest stable e2fsprogs release.
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-Rebase to 1.43:
-The upstream has disabled metadata_csum by default
-this rebase just revert 64bit feature.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- misc/mke2fs.conf.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
-index 01e35cf..25105b3 100644
---- a/misc/mke2fs.conf.in
-+++ b/misc/mke2fs.conf.in
-@@ -11,8 +11,9 @@
- 		features = has_journal
- 	}
- 	ext4 = {
--		features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
-+		features = has_journal,extent,huge_file,flex_bg,metadata_csum,dir_nlink,extra_isize
- 		inode_size = 256
-+		auto_64-bit_support = 1
- 	}
- 	small = {
- 		blocksize = 1024
diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb
index ed94615..5cda89f 100644
--- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb
+++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.5.bb
@@ -3,7 +3,6 @@
 SRC_URI += "file://remove.ldconfig.call.patch \
             file://run-ptest \
             file://ptest.patch \
-            file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
             file://mkdir_p.patch \
             file://0001-misc-create_inode.c-set-dir-s-mode-correctly.patch \
             file://0001-create_inode-fix-copying-large-files.patch \
diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
index 5b8049f..75acf59 100644
--- a/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.176.bb
@@ -4,7 +4,7 @@
 LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "libtool bzip2 zlib virtual/libintl"
-DEPENDS_append_libc-musl = " argp-standalone fts "
+DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
 # The Debian patches below are from:
 # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz
 SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
@@ -31,12 +31,13 @@
            file://0001-skip-the-test-when-gcc-not-deployed.patch \
            file://run-ptest \
            file://ptest.patch \
-           file://musl.patch \
            "
-SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \
-                             file://0001-fix-err-variable-and-function-conflicts.patch \
-"
-
+SRC_URI_append_libc-musl = " \
+           file://musl-obstack-fts.patch \
+           file://musl-libs.patch \
+           file://musl-utils.patch \
+           file://musl-tests.patch \
+           "
 SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9"
 SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023"
 
@@ -85,8 +86,6 @@
 EXTRA_OEMAKE_class-native = ""
 EXTRA_OEMAKE_class-nativesdk = ""
 
-ALLOW_EMPTY_${PN}_libc-musl = "1"
-
 BBCLASSEXTEND = "native nativesdk"
 
 # Package utilities separately
diff --git a/poky/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch b/poky/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
deleted file mode 100644
index 433db13..0000000
--- a/poky/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 2c50fe7068bd6911958c6d851aef88179e73bb21 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <Mingli.Yu@windriver.com>
-Date: Tue, 16 Apr 2019 15:30:38 +0800
-Subject: [PATCH] fix err variable and function conflicts
-
-There comes below build failure with musl when
-ptest enabled.
-| In file included from ../../elfutils-0.176/tests/dwfl-proc-attach.c:33:
-| ../../elfutils-0.176/lib/system.h:63:35: error: called object 'err' is not a function or function pointer
-|  #define error(status, errno, ...) err(status, __VA_ARGS__)
-|                                    ^~~
-| ../../elfutils-0.176/tests/dwfl-proc-attach.c:92:5: note: in expansion of macro 'error'
-|      error (-1, 0, "dwfl_linux_proc_attach pid %d: %s", pid,
-|      ^~~~~
-| ../../elfutils-0.176/tests/dwfl-proc-attach.c:79:7: note: declared here
-|    int err;
-|        ^~~
-
-It is because there is no error.h in musl and
-the patch 0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
-has updated to use err.h to replace error.h
-and also added macro definiton as below when
-use musl.
- #define error(status, errno, ...) err(status, __VA_ARGS__)
-
-And in err.h, there is below logic:
-_Noreturn void err(int, const char *, ...);
-
-But when ptest enabled, there comes below error
-as there is both variable and function defined
-to be err in tests/dwfl-proc-attach.c.
-So change the err variable's name to workaround
-the build failure with musl.
-
-Upstream-Status: Inappropriate [workaround in musl]
-
-Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
----
- tests/dwfl-proc-attach.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: elfutils-0.176/tests/dwfl-proc-attach.c
-===================================================================
---- elfutils-0.176.orig/tests/dwfl-proc-attach.c
-+++ elfutils-0.176/tests/dwfl-proc-attach.c
-@@ -76,10 +76,10 @@ main (int argc __attribute__ ((unused)),
-       char **argv __attribute__ ((unused)))
- {
-   /* Create two extra threads to iterate through.  */
--  int err;
--  if ((err = pthread_create (&thread1, NULL, sleeper, NULL)) != 0)
-+  int err1;
-+  if ((err1 = pthread_create (&thread1, NULL, sleeper, NULL)) != 0)
-     error (-1, err, "Couldn't create thread1");
--  if ((err = pthread_create (&thread2, NULL, sleeper, NULL)) != 0)
-+  if ((err1 = pthread_create (&thread2, NULL, sleeper, NULL)) != 0)
-     error (-1, err, "Couldn't create thread2");
- 
-   Dwfl *dwfl = dwfl_begin (&proc_callbacks);
-Index: elfutils-0.176/tests/backtrace.c
-===================================================================
---- elfutils-0.176.orig/tests/backtrace.c
-+++ elfutils-0.176/tests/backtrace.c
-@@ -219,23 +219,23 @@ dump (Dwfl *dwfl)
- {
-   ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0);
-   assert (ptrdiff == 0);
--  bool err = false;
-+  bool err1 = false;
-   switch (dwfl_getthreads (dwfl, thread_callback, NULL))
-     {
-     case 0:
-       break;
-     case DWARF_CB_ABORT:
--      err = true;
-+      err1 = true;
-       break;
-     case -1:
-       error (0, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
--      err = true;
-+      err1 = true;
-       break;
-     default:
-       abort ();
-     }
-   callback_verify (0, 0, 0, NULL, dwfl);
--  if (err)
-+  if (err1)
-     exit (EXIT_FAILURE);
- }
- 
diff --git a/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
deleted file mode 100644
index 10cdac6..0000000
--- a/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From 990d377a92f4bab04bf6820fc81b3dcb6cf5e31d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Jul 2018 09:52:23 +0800
-Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
- compiling it on musl
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Rebase to 0.175
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
----
- Makefile.am                      |  2 +-
- lib/fixedsizehash.h              |  1 -
- lib/system.h                     | 12 +++++++++++-
- libdw/Makefile.am                |  3 ++-
- libdwfl/dwfl_build_id_find_elf.c |  1 +
- libdwfl/dwfl_error.c             |  4 +++-
- libdwfl/dwfl_module_getdwarf.c   |  1 +
- libdwfl/libdwfl_crc32_file.c     |  9 +++++++++
- libdwfl/linux-kernel-modules.c   |  1 +
- libelf/elf.h                     |  8 ++++++--
- libelf/libelf.h                  |  1 +
- libelf/libelfP.h                 |  1 +
- 12 files changed, 37 insertions(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 2ff444e..41f77df 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
- 
- # Add doc back when we have some real content.
- SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
--	  backends src po tests
-+	  backends po tests
- 
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
- 	     COPYING COPYING-GPLV2 COPYING-LGPLV3
-diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
-index dac2a5f..43016fc 100644
---- a/lib/fixedsizehash.h
-+++ b/lib/fixedsizehash.h
-@@ -30,7 +30,6 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
- 
- #include <system.h>
- 
-diff --git a/lib/system.h b/lib/system.h
-index 292082b..308a762 100644
---- a/lib/system.h
-+++ b/lib/system.h
-@@ -30,7 +30,7 @@
- #define LIB_SYSTEM_H	1
- 
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/param.h>
-@@ -51,6 +51,8 @@
- #else
- # error "Unknown byte order"
- #endif
-+
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
- 
- #ifndef MAX
- #define MAX(m, n) ((m) < (n) ? (n) : (m))
-diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index 7a3d532..7ac1241 100644
---- a/libdw/Makefile.am
-+++ b/libdw/Makefile.am
-@@ -108,7 +108,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
- libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
- 	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
- libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
--libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
-+fts_LDADD = -lfts
-+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD)
- libdw_so_SOURCES =
- libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
- # The rpath is necessary for libebl because its $ORIGIN use will
-diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
-index cc6c3f6..b06ab59 100644
---- a/libdwfl/dwfl_build_id_find_elf.c
-+++ b/libdwfl/dwfl_build_id_find_elf.c
-@@ -31,6 +31,7 @@
- #endif
- 
- #include "libdwflP.h"
-+#include "system.h"
- #include <inttypes.h>
- #include <fcntl.h>
- #include <unistd.h>
-diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
-index 7bcf61c..c345797 100644
---- a/libdwfl/dwfl_error.c
-+++ b/libdwfl/dwfl_error.c
-@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
- const char *
- dwfl_errmsg (int error)
- {
-+  static __thread char s[64] = "";
-   if (error == 0 || error == -1)
-     {
-       int last_error = global_error;
-@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
-   switch (error &~ 0xffff)
-     {
-     case OTHER_ERROR (ERRNO):
--      return strerror_r (error & 0xffff, "bad", 0);
-+      strerror_r (error & 0xffff, s, sizeof(s));
-+      return s;
-     case OTHER_ERROR (LIBELF):
-       return elf_errmsg (error & 0xffff);
-     case OTHER_ERROR (LIBDW):
-diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
-index 56e6105..f4a0649 100644
---- a/libdwfl/dwfl_module_getdwarf.c
-+++ b/libdwfl/dwfl_module_getdwarf.c
-@@ -35,6 +35,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <unistd.h>
-+#include "system.h"
- #include "../libdw/libdwP.h"	/* DWARF_E_* values are here.  */
- #include "../libelf/libelfP.h"
- #include "system.h"
-diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
-index 360e4ee..b5aa397 100644
---- a/libdwfl/linux-kernel-modules.c
-+++ b/libdwfl/linux-kernel-modules.c
-@@ -41,6 +41,7 @@
- 
- #include "libelfP.h"
- #include "libdwflP.h"
-+#include "system.h"
- #include <inttypes.h>
- #include <errno.h>
- #include <stdio.h>
-diff --git a/libelf/elf.h b/libelf/elf.h
-index 5dc632b..14da1b7 100644
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -21,7 +21,9 @@
- 
- #include <features.h>
- 
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
- 
- /* Standard ELF types.  */
- 
-@@ -3937,6 +3939,8 @@ enum
- #define R_METAG_TLS_LE_HI16	60
- #define R_METAG_TLS_LE_LO16	61
- 
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
- 
- #endif	/* elf.h */
-diff --git a/libelf/libelf.h b/libelf/libelf.h
-index 1ff11c9..c21e018 100644
---- a/libelf/libelf.h
-+++ b/libelf/libelf.h
-@@ -29,6 +29,7 @@
- #ifndef _LIBELF_H
- #define _LIBELF_H 1
- 
-+#include <fcntl.h>
- #include <stdint.h>
- #include <sys/types.h>
- 
-diff --git a/libelf/libelfP.h b/libelf/libelfP.h
-index 9f3e8e9..10a347a 100644
---- a/libelf/libelfP.h
-+++ b/libelf/libelfP.h
-@@ -32,6 +32,7 @@
- 
- #include <ar.h>
- #include <gelf.h>
-+#include <libelf.h>
- 
- #include <errno.h>
- #include <stdbool.h>
diff --git a/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch b/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch
new file mode 100644
index 0000000..51ca630
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/musl-libs.patch
@@ -0,0 +1,111 @@
+Collection of fixes needed to compile libelf and other libraries
+provided by elfutils for musl targets
+
+error is glibc specific API, so this patch will mostly not accepted
+upstream given that elfutils has been closely tied to glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [workaround for musl]
+
+--- /dev/null
++++ b/lib/error.h
+@@ -0,0 +1,27 @@
++#ifndef _ERROR_H_
++#define _ERROR_H_
++
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++static unsigned int error_message_count = 0;
++
++static inline void error(int status, int errnum, const char* format, ...)
++{
++	va_list ap;
++	fprintf(stderr, "%s: ", program_invocation_name);
++	va_start(ap, format);
++	vfprintf(stderr, format, ap);
++	va_end(ap);
++	if (errnum)
++		fprintf(stderr, ": %s", strerror(errnum));
++	fprintf(stderr, "\n");
++	error_message_count++;
++	if (status)
++		exit(status);
++}
++
++#endif	/* _ERROR_H_ */
+--- a/lib/fixedsizehash.h
++++ b/lib/fixedsizehash.h
+@@ -30,7 +30,6 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/cdefs.h>
+ 
+ #include <system.h>
+ 
+--- a/lib/libeu.h
++++ b/lib/libeu.h
+@@ -29,6 +29,7 @@
+ #ifndef LIBEU_H
+ #define LIBEU_H
+ 
++#include "system.h"
+ #include <stddef.h>
+ #include <stdint.h>
+ 
+--- a/libdwfl/dwfl_error.c
++++ b/libdwfl/dwfl_error.c
+@@ -154,7 +154,16 @@ dwfl_errmsg (int error)
+   switch (error &~ 0xffff)
+     {
+     case OTHER_ERROR (ERRNO):
++#if defined(__GLIBC__)
+       return strerror_r (error & 0xffff, "bad", 0);
++#else
++      {
++        static __thread char buf[128] = "";
++        if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0)
++          return buf;
++      }
++      return "strerror_r() failed";
++#endif
+     case OTHER_ERROR (LIBELF):
+       return elf_errmsg (error & 0xffff);
+     case OTHER_ERROR (LIBDW):
+--- a/libdwfl/linux-kernel-modules.c
++++ b/libdwfl/linux-kernel-modules.c
+@@ -50,6 +50,7 @@
+ #include <sys/utsname.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include "system.h"
+ 
+ /* If fts.h is included before config.h, its indirect inclusions may not
+    give us the right LFS aliases of these functions, so map them manually.  */
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -21,7 +21,9 @@
+ 
+ #include <features.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Standard ELF types.  */
+ 
+@@ -3937,6 +3939,7 @@ enum
+ #define R_METAG_TLS_LE_HI16	60
+ #define R_METAG_TLS_LE_LO16	61
+ 
+-__END_DECLS
+-
++#ifdef __cplusplus
++}
++#endif
+ #endif	/* elf.h */
diff --git a/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch b/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
new file mode 100644
index 0000000..0fb7eb9
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
@@ -0,0 +1,105 @@
+Look for libfts and libobstack during configure, these
+libraries are external to libc when using musl, whereas
+on glibc these libraries are provided in libc itself.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [workaround for musl]
+--- a/configure.ac
++++ b/configure.ac
+@@ -494,6 +494,60 @@ else
+ fi
+ AC_SUBST([argp_LDADD])
+ 
++dnl Check if we have fts available from our libc
++AC_LINK_IFELSE(
++	[AC_LANG_PROGRAM(
++		[#if !defined(__x86_64__)
++		#undef  _FILE_OFFSET_BITS
++		#define _FILE_OFFSET_BITS 32
++		#endif
++		#include <fts.h>],
++		[FTS* fts = 0; return fts_close(fts); return 0;]
++		)],
++	[libc_has_fts="true"],
++	[libc_has_fts="false"]
++)
++
++dnl If our libc doesn't provide fts, then test for libfts
++if test "$libc_has_fts" = "false" ; then
++	AC_MSG_WARN("libc does not have fts")
++	AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"])
++
++	if test "$have_fts" = "false"; then
++		AC_MSG_ERROR("no libfts found")
++	else
++		fts_LDADD="-lfts"
++	fi
++else
++	fts_LDADD=""
++fi
++AC_SUBST([fts_LDADD])
++
++dnl Check if we have obstack available from our libc
++AC_LINK_IFELSE(
++	[AC_LANG_PROGRAM(
++		[#include <obstack.h>],
++		[_obstack_begin(0, 0, 0, NULL, NULL); return 0;]
++		)],
++	[libc_has_obstack="true"],
++	[libc_has_obstack="false"]
++)
++
++dnl If our libc doesn't provide obstack, then test for libobstack
++if test "$libc_has_obstack" = "false" ; then
++	AC_MSG_WARN("libc does not have obstack")
++	AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"])
++
++	if test "$have_obstack" = "false"; then
++		AC_MSG_ERROR("no libobstack found")
++	else
++		obstack_LDADD="-lobstack"
++	fi
++else
++	obstack_LDADD=""
++fi
++AC_SUBST([obstack_LDADD])
++
+ dnl The directories with content.
+ 
+ dnl Documentation.
+--- a/libdw/Makefile.am
++++ b/libdw/Makefile.am
+@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURC
+ libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ 	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
+ libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
+-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS)
++libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LDADD) $(zip_LIBS)
+ libdw_so_SOURCES =
+ libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
+ # The rpath is necessary for libebl because its $ORIGIN use will
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -68,8 +68,8 @@ ar_no_Wstack_usage = yes
+ unstrip_no_Wstack_usage = yes
+ 
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \
+-	   $(demanglelib)
++nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \
++	   $(obstack_LDADD) -ldl $(demanglelib)
+ size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
+ strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
+ elflint_LDADD  = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+@@ -77,9 +77,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
+ addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
+ elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+ objdump_LDADD  = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
+-ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
++ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD)
+ strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
+-ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
++ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD)
+ unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
+ stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib)
+ elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
diff --git a/poky/meta/recipes-devtools/elfutils/files/musl.patch b/poky/meta/recipes-devtools/elfutils/files/musl-tests.patch
similarity index 100%
rename from poky/meta/recipes-devtools/elfutils/files/musl.patch
rename to poky/meta/recipes-devtools/elfutils/files/musl-tests.patch
diff --git a/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch b/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch
new file mode 100644
index 0000000..8e636bf
--- /dev/null
+++ b/poky/meta/recipes-devtools/elfutils/files/musl-utils.patch
@@ -0,0 +1,136 @@
+Provide missing defines which otherwise are available on glibc system headers
+
+Alter the error API to match posix version
+use qsort instead of qsort_r which is glibc specific API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [workaround for musl]
+--- a/src/arlib.h
++++ b/src/arlib.h
+@@ -29,6 +29,12 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+ 
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(DEFFILEMODE)
++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
++#endif
+ 
+ /* State of -D/-U flags.  */
+ extern bool arlib_deterministic_output;
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -37,6 +37,13 @@
+ #include "libeu.h"
+ #include "printversion.h"
+ 
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH (0)
++#endif
++
+ /* Name and version of program.  */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+ 
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -4792,10 +4792,11 @@ listptr_base (struct listptr *p)
+   return cudie_base (&cu);
+ }
+ 
++static const char *listptr_name;
++
+ static int
+-compare_listptr (const void *a, const void *b, void *arg)
++compare_listptr (const void *a, const void *b)
+ {
+-  const char *name = arg;
+   struct listptr *p1 = (void *) a;
+   struct listptr *p2 = (void *) b;
+ 
+@@ -4811,21 +4812,21 @@ compare_listptr (const void *a, const vo
+ 	  p1->warned = p2->warned = true;
+ 	  error (0, 0,
+ 		 gettext ("%s %#" PRIx64 " used with different address sizes"),
+-		 name, (uint64_t) p1->offset);
++		 listptr_name, (uint64_t) p1->offset);
+ 	}
+       if (p1->dwarf64 != p2->dwarf64)
+ 	{
+ 	  p1->warned = p2->warned = true;
+ 	  error (0, 0,
+ 		 gettext ("%s %#" PRIx64 " used with different offset sizes"),
+-		 name, (uint64_t) p1->offset);
++		 listptr_name, (uint64_t) p1->offset);
+ 	}
+       if (listptr_base (p1) != listptr_base (p2))
+ 	{
+ 	  p1->warned = p2->warned = true;
+ 	  error (0, 0,
+ 		 gettext ("%s %#" PRIx64 " used with different base addresses"),
+-		 name, (uint64_t) p1->offset);
++		 listptr_name, (uint64_t) p1->offset);
+ 	}
+       if (p1->attr != p2 ->attr)
+ 	{
+@@ -4833,7 +4834,7 @@ compare_listptr (const void *a, const vo
+ 	  error (0, 0,
+ 		 gettext ("%s %#" PRIx64
+ 			  " used with different attribute %s and %s"),
+-		 name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
++		 listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
+ 		 dwarf_attr_name (p2->attr));
+ 	}
+     }
+@@ -4905,8 +4906,11 @@ static void
+ sort_listptr (struct listptr_table *table, const char *name)
+ {
+   if (table->n > 0)
+-    qsort_r (table->table, table->n, sizeof table->table[0],
+-	     &compare_listptr, (void *) name);
++    {
++      listptr_name = name;
++      qsort (table->table, table->n, sizeof table->table[0],
++	    &compare_listptr);
++    }
+ }
+ 
+ static bool
+--- a/src/strip.c
++++ b/src/strip.c
+@@ -46,6 +46,13 @@
+ #include <system.h>
+ #include <printversion.h>
+ 
++#if !defined(ACCESSPERMS)
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
++#endif
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH (0)
++#endif
++
+ typedef uint8_t GElf_Byte;
+ 
+ /* Name and version of program.  */
+--- a/src/unstrip.c
++++ b/src/unstrip.c
+@@ -56,6 +56,15 @@
+ # define _(str) gettext (str)
+ #endif
+ 
++#ifndef strndupa
++#define strndupa(s, n) \
++       ({const char *__in = (s); \
++         size_t __len = strnlen (__in, (n)) + 1; \
++         char *__out = (char *) alloca (__len); \
++         __out[__len-1] = '\0'; \
++         (char *) memcpy (__out, __in, __len-1);})
++#endif
++
+ /* Name and version of program.  */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+ 
diff --git a/poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/poky/meta/recipes-devtools/flex/flex_2.6.0.bb
index b477cd8..12ce0cb 100644
--- a/poky/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -68,3 +68,6 @@
 	    -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
 	    -i ${D}${PTEST_PATH}/Makefile
 }
+
+# Not Apache Flex, or Adobe Flex, or IBM Flex.
+CVE_PRODUCT = "flex_project:flex"
diff --git a/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index f23a314..1ff85c8 100644
--- a/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/poky/meta/recipes-devtools/gcc/gcc-9.1/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,4 +1,4 @@
-From 492f008dce784749e39e1c396aeea6fa1d977374 Mon Sep 17 00:00:00 2001
+From 0e13b09ae400d8c8755e2869c72a158ed0dbc0b6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:24:50 +0400
 Subject: [PATCH 12/37] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -23,11 +23,12 @@
  gcc/config/i386/linux64.h    |  6 +++---
  gcc/config/linux.h           |  8 ++++----
  gcc/config/mips/linux.h      | 12 ++++++------
+ gcc/config/riscv/linux.h     |  2 +-
  gcc/config/rs6000/linux64.h  | 15 +++++----------
  gcc/config/sh/linux.h        |  2 +-
  gcc/config/sparc/linux.h     |  2 +-
  gcc/config/sparc/linux64.h   |  4 ++--
- 11 files changed, 28 insertions(+), 33 deletions(-)
+ 12 files changed, 29 insertions(+), 34 deletions(-)
 
 diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
 index 824861befec..6afacce3292 100644
@@ -152,11 +153,24 @@
  
  #undef MUSL_DYNAMIC_LINKER32
  #define MUSL_DYNAMIC_LINKER32 \
+diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
+index 58dd18b89f3..112ba9cd764 100644
+--- a/gcc/config/riscv/linux.h
++++ b/gcc/config/riscv/linux.h
+@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.  If not see
+     GNU_USER_TARGET_OS_CPP_BUILTINS();				\
+   } while (0)
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
+ 
+ #define MUSL_ABI_SUFFIX \
+   "%{mabi=ilp32:-sf}" \
 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index bcc540b5ff2..982ca274621 100644
+index 5380f6a6a6f..c0f2dc1f43e 100644
 --- a/gcc/config/rs6000/linux64.h
 +++ b/gcc/config/rs6000/linux64.h
-@@ -428,24 +428,19 @@ extern int dot_symbols;
+@@ -435,24 +435,19 @@ extern int dot_symbols;
  #undef	LINK_OS_DEFAULT_SPEC
  #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
  
@@ -200,10 +214,10 @@
  #undef SUBTARGET_LINK_EMUL_SUFFIX
  #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
 diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 2db9ea2172e..1979cfff5d3 100644
+index 08476f1d94d..80440e712ad 100644
 --- a/gcc/config/sparc/linux.h
 +++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
     When the -shared link option is used a final link is not being
     done.  */
  
@@ -213,7 +227,7 @@
  #undef  LINK_SPEC
  #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
 diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index 21e13001951..d39c38a531f 100644
+index 789d1df4bd5..b920c680fb1 100644
 --- a/gcc/config/sparc/linux64.h
 +++ b/gcc/config/sparc/linux64.h
 @@ -84,8 +84,8 @@ along with GCC; see the file COPYING3.  If not see
diff --git a/poky/meta/recipes-devtools/gdb/gdb-8.3.inc b/poky/meta/recipes-devtools/gdb/gdb-8.3.inc
index db8d5f3..a5ef936 100644
--- a/poky/meta/recipes-devtools/gdb/gdb-8.3.inc
+++ b/poky/meta/recipes-devtools/gdb/gdb-8.3.inc
@@ -16,6 +16,7 @@
            file://0009-Change-order-of-CFLAGS.patch \
            file://0010-resolve-restrict-keyword-conflict.patch \
            file://0011-Fix-invalid-sigprocmask-call.patch \
+           file://CVE-2017-9778.patch \
            "
 SRC_URI[md5sum] = "bbd95b2f9b34621ad7a19a3965476314"
 SRC_URI[sha256sum] = "802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e"
diff --git a/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch b/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch
new file mode 100644
index 0000000..f142ed0
--- /dev/null
+++ b/poky/meta/recipes-devtools/gdb/gdb/CVE-2017-9778.patch
@@ -0,0 +1,98 @@
+From 6ad3791f095cfc1b0294f62c4b3a524ba735595e Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Thu, 25 Apr 2019 07:27:02 -0700
+Subject: [PATCH] Detect invalid length field in debug frame FDE header.
+
+GDB was failing to catch cases where a corrupt ELF or core file
+contained an invalid length value in a Dwarf debug frame FDE header.
+It was checking for buffer overflow but not cases where the length was
+negative or caused pointer wrap-around.
+
+In addition to the additional validity check, this patch cleans up the
+multiple signed/unsigned conversions on the length field so that an
+unsigned representation is used consistently throughout.
+
+This patch fixes CVE-2017-9778 and PR gdb/21600.
+
+2019-04-25  Sandra Loosemore  <sandra@codesourcery.com>
+	    Kang Li <kanglictf@gmail.com>
+
+	PR gdb/21600
+
+	* dwarf2-frame.c (read_initial_length): Be consistent about using
+	unsigned representation of length.
+	(decode_frame_entry_1): Likewise.  Check for wraparound of
+	end pointer as well as buffer overflow.
+
+Upstream-Status: Backport
+CVE: CVE-2017-9778
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ gdb/ChangeLog      | 10 ++++++++++
+ gdb/dwarf2-frame.c | 14 +++++++-------
+ 2 files changed, 17 insertions(+), 7 deletions(-)
+
+diff --git a/gdb/ChangeLog b/gdb/ChangeLog
+index 1c125de..d028d2b 100644
+--- a/gdb/ChangeLog
++++ b/gdb/ChangeLog
+@@ -1,3 +1,13 @@
++2019-04-25  Sandra Loosemore  <sandra@codesourcery.com>
++	Kang Li <kanglictf@gmail.com>
++
++	PR gdb/21600
++
++	* dwarf2-frame.c (read_initial_length): Be consistent about using
++	unsigned representation of length.
++	(decode_frame_entry_1): Likewise.  Check for wraparound of
++	end pointer as well as buffer overflow.
++
+ 2019-05-11  Joel Brobecker  <brobecker@adacore.com>
+ 
+ 	* version.in: Set GDB version number to 8.3.
+diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
+index 178ac44..dc5d3b3 100644
+--- a/gdb/dwarf2-frame.c
++++ b/gdb/dwarf2-frame.c
+@@ -1488,7 +1488,7 @@ static ULONGEST
+ read_initial_length (bfd *abfd, const gdb_byte *buf,
+ 		     unsigned int *bytes_read_ptr)
+ {
+-  LONGEST result;
++  ULONGEST result;
+ 
+   result = bfd_get_32 (abfd, buf);
+   if (result == 0xffffffff)
+@@ -1789,7 +1789,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start,
+ {
+   struct gdbarch *gdbarch = get_objfile_arch (unit->objfile);
+   const gdb_byte *buf, *end;
+-  LONGEST length;
++  ULONGEST length;
+   unsigned int bytes_read;
+   int dwarf64_p;
+   ULONGEST cie_id;
+@@ -1800,15 +1800,15 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start,
+   buf = start;
+   length = read_initial_length (unit->abfd, buf, &bytes_read);
+   buf += bytes_read;
+-  end = buf + length;
+-
+-  /* Are we still within the section?  */
+-  if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
+-    return NULL;
++  end = buf + (size_t) length;
+ 
+   if (length == 0)
+     return end;
+ 
++  /* Are we still within the section?  */
++  if (end <= buf || end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
++    return NULL;
++
+   /* Distinguish between 32 and 64-bit encoded frame info.  */
+   dwarf64_p = (bytes_read == 12);
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/git/git.inc b/poky/meta/recipes-devtools/git/git.inc
index 26a22ac..6e13743 100644
--- a/poky/meta/recipes-devtools/git/git.inc
+++ b/poky/meta/recipes-devtools/git/git.inc
@@ -13,6 +13,8 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
 
+CVE_PRODUCT = "git-scm:git"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[cvsserver] = ""
 PACKAGECONFIG[svn] = ""
diff --git a/poky/meta/recipes-devtools/git/git_2.21.0.bb b/poky/meta/recipes-devtools/git/git_2.21.0.bb
deleted file mode 100644
index 434ff8f..0000000
--- a/poky/meta/recipes-devtools/git/git_2.21.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
-                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
-                 "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.md5sum] = "b8e00c2997774c5d4aaf26fd9d9aaf64"
-SRC_URI[tarball.sha256sum] = "85eca51c7404da75e353eba587f87fea9481ba41e162206a6f70ad8118147bee"
-SRC_URI[manpages.md5sum] = "8a168697b99a9a3f04f29f7d4bacd70b"
-SRC_URI[manpages.sha256sum] = "14c76ebb4e31f9e55cf5338a04fd3a13bced0323cd51794ccf45fc74bd0c1080"
diff --git a/poky/meta/recipes-devtools/git/git_2.22.0.bb b/poky/meta/recipes-devtools/git/git_2.22.0.bb
new file mode 100644
index 0000000..9e55fd6
--- /dev/null
+++ b/poky/meta/recipes-devtools/git/git_2.22.0.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+                 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+                 "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.md5sum] = "6deab33485c07cb3391ea0f255a936f2"
+SRC_URI[tarball.sha256sum] = "a4b7e4365bee43caa12a38d646d2c93743d755d1cea5eab448ffb40906c9da0b"
+SRC_URI[manpages.md5sum] = "d6cb42f12185a47ce3adaac24a1ded50"
+SRC_URI[manpages.sha256sum] = "f6a5750dfc4a0aa5ec0c0cc495d4995d1f36ed47591c3941be9756c1c3a1aa0a"
diff --git a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
index 2b4563d..dcbd05a 100644
--- a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
+++ b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
@@ -34,8 +34,9 @@
                       "
 
 ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset"
+ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset i2ctransfer"
 ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect"
 ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump"
 ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget"
 ALTERNATIVE_LINK_NAME[i2cset] = "${sbindir}/i2cset"
+ALTERNATIVE_LINK_NAME[i2ctransfer] = "${sbindir}/i2ctransfer"
diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.10.3.bb b/poky/meta/recipes-devtools/librepo/librepo_1.10.4.bb
similarity index 93%
rename from poky/meta/recipes-devtools/librepo/librepo_1.10.3.bb
rename to poky/meta/recipes-devtools/librepo/librepo_1.10.4.bb
index d7c83ed..50c9a82 100644
--- a/poky/meta/recipes-devtools/librepo/librepo_1.10.3.bb
+++ b/poky/meta/recipes-devtools/librepo/librepo_1.10.4.bb
@@ -7,7 +7,7 @@
            file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \
            "
 
-SRCREV = "2eb0a27031956fd98340ca2707f03abb7b780372"
+SRCREV = "9b2df22dbcdf9352672334098fff56335aa10423"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch b/poky/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch
new file mode 100755
index 0000000..5add0cc
--- /dev/null
+++ b/poky/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch
@@ -0,0 +1,21 @@
+libtool: remove host specific info from header file
+
+https://sources.debian.org/data/main/libt/libtool/2.4.6-10/debian/patches/
+        no_hostname.patch
+
+Upstream-Status: Inappropriate [not author]
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+Index: libtool-2.4.6/m4/libtool.m4
+===================================================================
+--- libtool-2.4.6.orig/m4/libtool.m4
++++ libtool-2.4.6/m4/libtool.m4
+@@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([
+     cat <<_LT_EOF >> "$cfgfile"
+ #! $SHELL
+ # Generated automatically by $as_me ($PACKAGE) $VERSION
+-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ 
+ # Provide generalized library-building support services.
diff --git a/poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index f5fdd00..a5715fa 100644
--- a/poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -1,6 +1,6 @@
 require libtool-${PV}.inc
 
-SRC_URI += "file://multilib.patch"
+SRC_URI += "file://multilib.patch file://debian-no_hostname.patch"
 
 RDEPENDS_${PN} += "bash"
 
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb
index 1549357..1756f34 100644
--- a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb
+++ b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb
@@ -16,11 +16,6 @@
     else:
         bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
 
-MESON_TOOLCHAIN_ARGS = "${BUILDSDK_CC_ARCH}${TOOLCHAIN_OPTIONS}"
-MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CFLAGS}"
-MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CXXFLAGS}"
-MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_LDFLAGS}"
-
 # The cross file logic is similar but not identical to that in meson.bbclass,
 # since it's generating for an SDK rather than a cross-compile. Important
 # differences are:
diff --git a/poky/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch b/poky/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch
new file mode 100644
index 0000000..6e3f909
--- /dev/null
+++ b/poky/meta/recipes-devtools/nasm/nasm/CVE-2018-19755.patch
@@ -0,0 +1,116 @@
+From 3079f7966dbed4497e36d5067cbfd896a90358cb Mon Sep 17 00:00:00 2001
+From: Cyrill Gorcunov <gorcunov@gmail.com>
+Date: Wed, 14 Nov 2018 10:03:42 +0300
+Subject: [PATCH] preproc: Fix malformed parameter count
+
+readnum returns 64bit number which may become
+a negative integer upon conversion which in
+turn lead to out of bound array access.
+
+Fix it by explicit conversion with bounds check
+
+ | POC6:2: error: parameter count `2222222222' is out of bounds [0; 2147483647]
+
+https://bugzilla.nasm.us/show_bug.cgi?id=3392528
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
+
+Upstream-Status: Backport
+CVE: CVE-2018-19755
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ asm/preproc.c | 43 +++++++++++++++++++++----------------------
+ 1 file changed, 21 insertions(+), 22 deletions(-)
+
+diff --git a/asm/preproc.c b/asm/preproc.c
+index b6afee3..e5ad05a 100644
+--- a/asm/preproc.c
++++ b/asm/preproc.c
+@@ -1650,6 +1650,23 @@ smacro_defined(Context * ctx, const char *name, int nparam, SMacro ** defn,
+     return false;
+ }
+ 
++/* param should be a natural number [0; INT_MAX] */
++static int read_param_count(const char *str)
++{
++    int result;
++    bool err;
++
++    result = readnum(str, &err);
++    if (result < 0 || result > INT_MAX) {
++        result = 0;
++        nasm_error(ERR_NONFATAL, "parameter count `%s' is out of bounds [%d; %d]",
++                   str, 0, INT_MAX);
++    } else if (err) {
++        nasm_error(ERR_NONFATAL, "unable to parse parameter count `%s'", str);
++    }
++    return result;
++}
++
+ /*
+  * Count and mark off the parameters in a multi-line macro call.
+  * This is called both from within the multi-line macro expansion
+@@ -1871,11 +1888,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
+                   pp_directives[ct]);
+         } else {
+             searching.nparam_min = searching.nparam_max =
+-                readnum(tline->text, &j);
+-            if (j)
+-                nasm_error(ERR_NONFATAL,
+-                      "unable to parse parameter count `%s'",
+-                      tline->text);
++                read_param_count(tline->text);
+         }
+         if (tline && tok_is_(tline->next, "-")) {
+             tline = tline->next->next;
+@@ -1886,11 +1899,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
+                       "`%s' expects a parameter count after `-'",
+                       pp_directives[ct]);
+             else {
+-                searching.nparam_max = readnum(tline->text, &j);
+-                if (j)
+-                    nasm_error(ERR_NONFATAL,
+-                          "unable to parse parameter count `%s'",
+-                          tline->text);
++                searching.nparam_max = read_param_count(tline->text);
+                 if (searching.nparam_min > searching.nparam_max) {
+                     nasm_error(ERR_NONFATAL,
+                           "minimum parameter count exceeds maximum");
+@@ -2079,8 +2088,6 @@ static void undef_smacro(Context *ctx, const char *mname)
+  */
+ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
+ {
+-    bool err;
+-
+     tline = tline->next;
+     skip_white_(tline);
+     tline = expand_id(tline);
+@@ -2103,11 +2110,7 @@ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
+     if (!tok_type_(tline, TOK_NUMBER)) {
+         nasm_error(ERR_NONFATAL, "`%s' expects a parameter count", directive);
+     } else {
+-        def->nparam_min = def->nparam_max =
+-            readnum(tline->text, &err);
+-        if (err)
+-            nasm_error(ERR_NONFATAL,
+-                  "unable to parse parameter count `%s'", tline->text);
++        def->nparam_min = def->nparam_max = read_param_count(tline->text);
+     }
+     if (tline && tok_is_(tline->next, "-")) {
+         tline = tline->next->next;
+@@ -2117,11 +2120,7 @@ static bool parse_mmacro_spec(Token *tline, MMacro *def, const char *directive)
+             nasm_error(ERR_NONFATAL,
+                   "`%s' expects a parameter count after `-'", directive);
+         } else {
+-            def->nparam_max = readnum(tline->text, &err);
+-            if (err) {
+-                nasm_error(ERR_NONFATAL, "unable to parse parameter count `%s'",
+-                      tline->text);
+-            }
++            def->nparam_max = read_param_count(tline->text);
+             if (def->nparam_min > def->nparam_max) {
+                 nasm_error(ERR_NONFATAL, "minimum parameter count exceeds maximum");
+                 def->nparam_max = def->nparam_min;
+-- 
+2.10.5.GIT
+
diff --git a/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb b/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb
index ecec78d..e4f964c 100644
--- a/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb
+++ b/poky/meta/recipes-devtools/nasm/nasm_2.14.02.bb
@@ -3,7 +3,9 @@
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
 
-SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2"
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \
+           file://CVE-2018-19755.patch \
+           "
 
 SRC_URI[md5sum] = "3f489aa48ad2aa1f967dc5e293bbd06f"
 SRC_URI[sha256sum] = "34fd26c70a277a9fdd54cb5ecf389badedaf48047b269d1008fbc819b24e80bc"
diff --git a/poky/meta/recipes-devtools/ninja/ninja_1.9.0.bb b/poky/meta/recipes-devtools/ninja/ninja_1.9.0.bb
index 1b06328..f1236e8 100644
--- a/poky/meta/recipes-devtools/ninja/ninja_1.9.0.bb
+++ b/poky/meta/recipes-devtools/ninja/ninja_1.9.0.bb
@@ -17,11 +17,11 @@
 do_configure[noexec] = "1"
 
 do_compile_class-native() {
-	./configure.py --bootstrap
+	python3 ./configure.py --bootstrap
 }
 
 do_compile() {
-	./configure.py
+	python3 ./configure.py
 	ninja
 }
 
diff --git a/poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch b/poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
deleted file mode 100644
index 47d1b3c..0000000
--- a/poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
+++ /dev/null
@@ -1,259 +0,0 @@
-From 64aa98646a17c299bf37af2975b98daf5d7d30b4 Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Thu, 31 Jan 2019 18:16:08 -0600
-Subject: [PATCH] libopkg: add --add-ignore-recommends option
-
-Add option to ignore specific recommended packages. On the libsolv
-backed, this feature will only work on libsolv version > 0.7.2 [1].
-
-[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openSUSE_libsolv_issues_254&d=DwIBaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ&m=GObNHzFJpWpf_PripIrf-K2RhsktYdAUEieAJexXOKw&s=3G-meChUqClFggFPqsrAxIZBfLnRKIHm62Uuy1X6nQQ&e=
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Accepted
----
- libopkg/opkg_conf.c                           |  2 +
- libopkg/opkg_conf.h                           |  1 +
- .../solvers/internal/pkg_depends_internal.c   |  3 +-
- libopkg/solvers/libsolv/opkg_solver_libsolv.c | 21 ++++++-
- man/opkg.1.in                                 |  3 +
- src/opkg.c                                    |  6 ++
- tests/Makefile                                |  1 +
- tests/core/43_add_ignore_recommends.py        | 62 +++++++++++++++++++
- 8 files changed, 97 insertions(+), 2 deletions(-)
- create mode 100755 tests/core/43_add_ignore_recommends.py
-
-diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
-index 06880a1..f2330cd 100644
---- a/libopkg/opkg_conf.c
-+++ b/libopkg/opkg_conf.c
-@@ -597,6 +597,7 @@ int opkg_conf_init(void)
-     pkg_dest_list_init(&opkg_config->tmp_dest_list);
-     nv_pair_list_init(&opkg_config->arch_list);
-     str_list_init(&opkg_config->exclude_list);
-+    str_list_init(&opkg_config->ignore_recommends_list);
- 
-     return 0;
- }
-@@ -938,6 +939,7 @@ void opkg_conf_deinit(void)
-     pkg_dest_list_deinit(&opkg_config->pkg_dest_list);
-     nv_pair_list_deinit(&opkg_config->arch_list);
-     str_list_deinit(&opkg_config->exclude_list);
-+    str_list_deinit(&opkg_config->ignore_recommends_list);
- 
-     if (opkg_config->verbosity >= DEBUG) {
-         hash_print_stats(&opkg_config->pkg_hash);
-diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index eb56a29..316c500 100644
---- a/libopkg/opkg_conf.h
-+++ b/libopkg/opkg_conf.h
-@@ -61,6 +61,7 @@ typedef struct opkg_conf {
-     pkg_dest_list_t tmp_dest_list;
-     nv_pair_list_t arch_list;
-     str_list_t exclude_list;
-+    str_list_t ignore_recommends_list;
- 
-     int restrict_to_default_dest;
-     pkg_dest_t *default_dest;
-diff --git a/libopkg/solvers/internal/pkg_depends_internal.c b/libopkg/solvers/internal/pkg_depends_internal.c
-index cd56d84..5deee70 100644
---- a/libopkg/solvers/internal/pkg_depends_internal.c
-+++ b/libopkg/solvers/internal/pkg_depends_internal.c
-@@ -228,7 +228,8 @@ int pkg_hash_fetch_unsatisfied_dependencies(pkg_t *pkg,
-                             || compound_depend->type == SUGGEST)
-                         && (satisfying_pkg->state_want == SW_DEINSTALL
-                             || satisfying_pkg->state_want == SW_PURGE
--                            || opkg_config->no_install_recommends);
-+                            || opkg_config->no_install_recommends
-+                            || str_list_contains(&opkg_config->ignore_recommends_list, satisfying_pkg->name));
-                 if (ignore) {
-                     opkg_msg(NOTICE,
-                              "%s: ignoring recommendation for "
-diff --git a/libopkg/solvers/libsolv/opkg_solver_libsolv.c b/libopkg/solvers/libsolv/opkg_solver_libsolv.c
-index 2b27e3a..403e07b 100644
---- a/libopkg/solvers/libsolv/opkg_solver_libsolv.c
-+++ b/libopkg/solvers/libsolv/opkg_solver_libsolv.c
-@@ -484,6 +484,7 @@ static void pkg2solvable(pkg_t *pkg, Solvable *solvable_out)
- static void populate_installed_repo(libsolv_solver_t *libsolv_solver)
- {
-     int i;
-+    Id what;
- 
-     pkg_vec_t *installed_pkgs = pkg_vec_alloc();
- 
-@@ -507,6 +508,15 @@ static void populate_installed_repo(libsolv_solver_t *libsolv_solver)
-         /* set solvable attributes */
-         pkg2solvable(pkg, solvable);
- 
-+        /* if the package is in ignore-recommends-list, disfavor installation */
-+        if (str_list_contains(&opkg_config->ignore_recommends_list, pkg->name)) {
-+            opkg_message(NOTICE, "Disfavor package: %s\n",
-+                         pkg->name);
-+            what = pool_str2id(libsolv_solver->pool, pkg->name, 1);
-+            queue_push2(&libsolv_solver->solver_jobs, SOLVER_SOLVABLE_NAME
-+                        | SOLVER_DISFAVOR, what);
-+        }
-+
-         /* if the package is not autoinstalled, mark it as user installed */
-         if (!pkg->auto_installed)
-             queue_push2(&libsolv_solver->solver_jobs, SOLVER_SOLVABLE
-@@ -539,7 +549,7 @@ static void populate_available_repos(libsolv_solver_t *libsolv_solver)
- {
-     int i;
-     Solvable *solvable;
--    Id solvable_id;
-+    Id solvable_id, what;
- 
-     pkg_vec_t *available_pkgs = pkg_vec_alloc();
- 
-@@ -608,6 +618,15 @@ static void populate_available_repos(libsolv_solver_t *libsolv_solver)
-         solvable = pool_id2solvable(libsolv_solver->pool, solvable_id);
-         pkg2solvable(pkg, solvable);
- 
-+        /* if the package is in ignore-recommends-list, disfavor installation */
-+        if (str_list_contains(&opkg_config->ignore_recommends_list, pkg->name)) {
-+            opkg_message(NOTICE, "Disfavor package: %s\n",
-+                         pkg->name);
-+            what = pool_str2id(libsolv_solver->pool, pkg->name, 1);
-+            queue_push2(&libsolv_solver->solver_jobs, SOLVER_SOLVABLE_NAME
-+                        | SOLVER_DISFAVOR, what);
-+        }
-+
-         /* if the --force-depends option is specified make dependencies weak */
-         if (opkg_config->force_depends)
-             queue_push2(&libsolv_solver->solver_jobs, SOLVER_SOLVABLE
-diff --git a/man/opkg.1.in b/man/opkg.1.in
-index 27fa9c1..f192c3b 100644
---- a/man/opkg.1.in
-+++ b/man/opkg.1.in
-@@ -162,6 +162,9 @@ priority \fIprio\fP. Lower priorities take precedence.
- \fB\--add-exclude <\fIname\fP>\fR
- Register package to be excluded from install
- .TP
-+\fB\--add-ignore-recommends <\fIname\fP>\fR
-+Register package to be ignored as a recomendee
-+.TP
- \fB\--prefer-arch-to-version\fR
- Use the architecture priority package rather than the higher version
- one if more than one candidate is found.
-diff --git a/src/opkg.c b/src/opkg.c
-index 650e278..3c93a3b 100644
---- a/src/opkg.c
-+++ b/src/opkg.c
-@@ -51,6 +51,7 @@ enum {
-     ARGS_OPT_ADD_DEST,
-     ARGS_OPT_SIZE,
-     ARGS_OPT_ADD_EXCLUDE,
-+    ARGS_OPT_ADD_IGNORE_RECOMMENDS,
-     ARGS_OPT_NOACTION,
-     ARGS_OPT_DOWNLOAD_ONLY,
-     ARGS_OPT_NODEPS,
-@@ -112,6 +113,7 @@ static struct option long_options[] = {
-     {"add-dest", 1, 0, ARGS_OPT_ADD_DEST},
-     {"size", 0, 0, ARGS_OPT_SIZE},
-     {"add-exclude", 1, 0, ARGS_OPT_ADD_EXCLUDE},
-+    {"add-ignore-recommends", 1, 0, ARGS_OPT_ADD_IGNORE_RECOMMENDS},
-     {"test", 0, 0, ARGS_OPT_NOACTION},
-     {"tmp-dir", 1, 0, 't'},
-     {"tmp_dir", 1, 0, 't'},
-@@ -234,6 +236,9 @@ static int args_parse(int argc, char *argv[])
-         case ARGS_OPT_ADD_EXCLUDE:
-             str_list_append(&opkg_config->exclude_list, optarg);
-             break;
-+        case ARGS_OPT_ADD_IGNORE_RECOMMENDS:
-+            str_list_append(&opkg_config->ignore_recommends_list, optarg);
-+            break;
-         case ARGS_OPT_SIZE:
-             opkg_config->size = 1;
-             break;
-@@ -343,6 +348,7 @@ static void usage()
-     printf("\t--add-dest <name>:<path>        Register destination with given path\n");
-     printf("\t--add-arch <arch>:<prio>        Register architecture with given priority\n");
-     printf("\t--add-exclude <name>            Register package to be excluded from install\n");
-+    printf("\t--add-ignore-recommends <name>  Register package to be ignored as a recomendee\n");
-     printf("\t--prefer-arch-to-version        Use the architecture priority package rather\n");
-     printf("\t                                than the higher version one if more\n");
-     printf("\t                                than one candidate is found.\n");
-diff --git a/tests/Makefile b/tests/Makefile
-index 8e5be08..799816d 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -42,6 +42,7 @@ REGRESSION_TESTS := core/01_install.py \
- 		    core/40_arch.py \
- 		    core/41_info_fields.py \
- 		    core/42_info_description.py \
-+		    core/43_add_ignore_recommends.py \
- 		    regress/issue26.py \
- 		    regress/issue31.py \
- 		    regress/issue32.py \
-diff --git a/tests/core/43_add_ignore_recommends.py b/tests/core/43_add_ignore_recommends.py
-new file mode 100755
-index 0000000..7da0096
---- /dev/null
-+++ b/tests/core/43_add_ignore_recommends.py
-@@ -0,0 +1,62 @@
-+#! /usr/bin/env python3
-+#
-+# Create package 'a' (1.0) which Recommends 'c'.
-+# Install 'a' with --add-ignore-recommends 'c'.
-+# Check that only 'a' (1.0) is installed.
-+# Create package 'b' which Depends on 'c'.
-+# Install 'a' & 'b', with --add-ignore-recommends 'c'.
-+# Verify that 'a','b' & 'c' are installed.
-+# Uninstall 'b' & 'c'.
-+# Create package 'a' (2.0), which Recommends 'c'.
-+# Upgrade 'a' with --add-ignore-recommends 'c'
-+# Verify that only 'a' (2.0) is installed
-+#
-+
-+import os
-+import opk, cfg, opkgcl
-+
-+opk.regress_init()
-+o = opk.OpkGroup()
-+
-+o.add(Package='a', Recommends='c', Version='1.0')
-+o.add(Package='b', Depends='c')
-+o.add(Package='c')
-+o.write_opk()
-+o.write_list()
-+
-+opkgcl.update()
-+
-+opkgcl.install('a', '--add-ignore-recommends c')
-+
-+if not opkgcl.is_installed('a'):
-+	opk.fail("Package 'a' installed but reports as not installed.")
-+
-+if opkgcl.is_installed('c'):
-+	opk.xfail("[libsolv<0.7.3] Package 'c' should not have been installed since it was in --add-ignore-recommends.")
-+
-+opkgcl.remove('a')
-+opkgcl.install('a b', '--add-ignore-recommends c')
-+
-+if not opkgcl.is_installed('a'):
-+	opk.fail("Package 'a' installed but reports as not installed.")
-+
-+if not opkgcl.is_installed('b'):
-+	opk.fail("Package 'b' installed but reports as not installed.")
-+
-+if not opkgcl.is_installed('c'):
-+	opk.fail("Package 'c' should have been installed since 'b' depends on it.")
-+
-+opkgcl.remove('b c', '--force-depends')
-+o.add(Package='a', Recommends='c', Version='2.0')
-+o.write_opk()
-+o.write_list()
-+
-+opkgcl.update()
-+
-+opkgcl.upgrade('a', '--add-ignore-recommends c')
-+
-+if not opkgcl.is_installed('a', '2.0'):
-+	opk.fail("Package 'a (2.0)' installed but reports as not installed.")
-+
-+if opkgcl.is_installed('c'):
-+	opk.fail("Package 'c' should not have been installed since it was in --add-ignore-recommends.")
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch b/poky/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch
deleted file mode 100644
index 951c186..0000000
--- a/poky/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 8fb0364bd0e19f35c20616dd1ab10aa00e08fa8f Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Wed, 10 Apr 2019 14:49:43 -0500
-Subject: [PATCH] opkg: add target for testsuite installation
-
-- Add target to install testsuite
-- Add override of opkg binary used during test via OPKG_PATH environment
-variable.
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
----
-Upstream-Status: Submitted
-
- Makefile.am  | 5 +++++
- tests/cfg.py | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 90cfcae..1f6a784 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -18,3 +18,8 @@ run-tests:
- 	$(MAKE) -C tests DATADIR=@datadir@ SYSCONFDIR=@sysconfdir@ VARDIR=@localstatedir@
- 
- check: run-tests
-+
-+install-ptest:
-+	cp -r $(srcdir)/tests $(DESTDIR)
-+	cp Makefile $(DESTDIR)
-+	sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile
-diff --git a/tests/cfg.py b/tests/cfg.py
-index 4efaff6..ca59d03 100644
---- a/tests/cfg.py
-+++ b/tests/cfg.py
-@@ -2,4 +2,4 @@ import os
- 
- opkdir = "/tmp/opk"
- offline_root = "/tmp/opkg"
--opkgcl = os.path.realpath("../src/opkg")
-+opkgcl = os.getenv('OPKG_PATH', os.path.realpath("../src/opkg"))
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch b/poky/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
deleted file mode 100644
index 75ecb5f..0000000
--- a/poky/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 5f005830eea7d03c02107a3a3fc58907b0a037bf Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Mon, 8 Apr 2019 11:14:56 -0500
-Subject: [PATCH] regress/issue72.py: resolve paths before comparision
-
-In systems that have a volatile /tmp, the test incorrectly fails since
-it doesn't resolve the real path in all cases.
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
----
-Upstream-Status: Submitted
-
- tests/regress/issue72.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/regress/issue72.py b/tests/regress/issue72.py
-index 1626877..2f24dec 100755
---- a/tests/regress/issue72.py
-+++ b/tests/regress/issue72.py
-@@ -56,7 +56,7 @@ if not os.path.lexists("{}/{}".format(cfg.offline_root, long_filename2)):
- 				"not created.")
- 
- linky = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename2))
--linky_dst = "{}/{}".format(cfg.offline_root, long_filename)
-+linky_dst = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename))
- if linky != linky_dst:
- 	opk.fail("symlink path truncated.")
- 
--- 
-2.20.1
-
diff --git a/poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb b/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb
similarity index 76%
rename from poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb
rename to poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb
index e2305d0..6270862 100644
--- a/poky/meta/recipes-devtools/opkg/opkg_0.4.0.bb
+++ b/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb
@@ -14,14 +14,11 @@
 SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
            file://opkg.conf \
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
-           file://0001-libopkg-add-add-ignore-recommends-option.patch \
-           file://0001-regress-issue72.py-resolve-paths-before-comparision.patch \
-           file://0001-opkg-add-target-for-testsuite-installation.patch \
            file://run-ptest \
 "
 
-SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5"
-SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe"
+SRC_URI[md5sum] = "ba0c21305fc93b26e844981ef100dc85"
+SRC_URI[sha256sum] = "45ac1e037d3877f635d883f8a555e172883a25d3eeb7986c75890fdd31250a43"
 
 # This needs to be before ptest inherit, otherwise all ptest files end packaged
 # in libopkg package if OPKGLIBDIR == libdir, because default
@@ -31,7 +28,7 @@
 inherit autotools pkgconfig systemd ptest
 
 target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
+OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
 PACKAGECONFIG ??= "libsolv"
 
@@ -45,6 +42,16 @@
 
 EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
 
+# Release tarball has unused binaries on the tests folder, automatically created by automake.
+# For now, delete them to avoid packaging errors (wrong architecture)
+do_unpack_append () {
+    bb.build.exec_func('remove_test_binaries', d)
+}
+
+remove_test_binaries () {
+	rm ${WORKDIR}/opkg-${PV}/tests/libopkg_test*
+}
+
 do_install_append () {
 	install -d ${D}${sysconfdir}/opkg
 	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
@@ -54,6 +61,11 @@
 	install -d ${D}${OPKGLIBDIR}/opkg
 }
 
+do_install_ptest () {
+	sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile
+	sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
+}
+
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
diff --git a/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch b/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
index 07f1531..3a41820 100644
--- a/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
+++ b/poky/meta/recipes-devtools/perl/files/0001-enc2xs-Add-environment-variable-to-suppress-comments.patch
@@ -8,7 +8,7 @@
 reproducible output by omitting the name of the generating program.
 
 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-Upstream-status: Accepted [https://github.com/dankogai/p5-encode/pull/145]
+Upstream-Status: Accepted [https://github.com/dankogai/p5-encode/pull/145]
 ---
  cpan/Encode/bin/enc2xs | 1 +
  1 file changed, 1 insertion(+)
diff --git a/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch b/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
index e70ff67..686cc71 100644
--- a/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
+++ b/poky/meta/recipes-devtools/perl/files/0002-Constant-Fix-up-shebang.patch
@@ -9,7 +9,7 @@
 absolute path to miniperl.
 
 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-Upstream-status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866]
+Upstream-Status: Submitted [https://rt.cpan.org/Public/Bug/Display.html?id=129866]
 ---
  cpan/ExtUtils-Constant/lib/ExtUtils/Constant/XS.pm | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.1.bb b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb
similarity index 94%
rename from poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.1.bb
rename to poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb
index c60ef74..94bc112 100644
--- a/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.1.bb
+++ b/poky/meta/recipes-devtools/pkgconf/pkgconf_1.6.3.bb
@@ -21,8 +21,8 @@
     file://pkg-config-native.in \
     file://pkg-config-esdk.in \
 "
-SRC_URI[md5sum] = "556bae2b9e0cc7b46e7c00083cb6d95d"
-SRC_URI[sha256sum] = "22b9ee38438901f9d60f180e5182821180854fa738fd071f593ea26a81da208c"
+SRC_URI[md5sum] = "f93fb1be95a5cb62e43c219c82b5791a"
+SRC_URI[sha256sum] = "61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210"
 
 inherit autotools
 
diff --git a/poky/meta/recipes-devtools/python/python-mako.inc b/poky/meta/recipes-devtools/python/python-mako.inc
deleted file mode 100644
index 20808fe..0000000
--- a/poky/meta/recipes-devtools/python/python-mako.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Templating library for Python"
-HOMEPAGE = "http://www.makotemplates.org/"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
-
-PYPI_PACKAGE = "Mako"
-
-inherit pypi
-
-SRC_URI[md5sum] = "a94d376078dda65f834ea5049a81ebb5"
-SRC_URI[sha256sum] = "7165919e78e1feb68b4dbe829871ea9941398178fa58e6beedb9ba14acf63965"
-
-RDEPENDS_${PN} = "${PYTHON_PN}-html \
-                  ${PYTHON_PN}-netclient \
-                  ${PYTHON_PN}-threading \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python.inc b/poky/meta/recipes-devtools/python/python.inc
index 779df53..8d0e908 100644
--- a/poky/meta/recipes-devtools/python/python.inc
+++ b/poky/meta/recipes-devtools/python/python.inc
@@ -8,6 +8,11 @@
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+           file://bpo-35907-cve-2019-9948.patch \
+           file://bpo-35907-cve-2019-9948-fix.patch \
+           file://bpo-36216-cve-2019-9636.patch \
+           file://bpo-36216-cve-2019-9636-fix.patch \
+           file://CVE-2019-9740.patch \
            "
 
 SRC_URI[md5sum] = "30157d85a2c0479c09ea2cbe61f2aaf5"
diff --git a/poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch b/poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch
new file mode 100644
index 0000000..066ac68
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch
@@ -0,0 +1,215 @@
+From bb8071a4cae5ab3fe321481dd3d73662ffb26052 Mon Sep 17 00:00:00 2001
+From: Victor Stinner <victor.stinner@gmail.com>
+Date: Tue, 21 May 2019 15:12:33 +0200
+Subject: [PATCH] bpo-30458: Disallow control chars in http URLs (GH-12755)
+ (GH-13154) (GH-13315)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Disallow control chars in http URLs in urllib2.urlopen.  This
+addresses a potential security problem for applications that do not
+sanity check their URLs where http request headers could be injected.
+
+Disable https related urllib tests on a build without ssl (GH-13032)
+These tests require an SSL enabled build. Skip these tests when
+python is built without SSL to fix test failures.
+
+Use httplib.InvalidURL instead of ValueError as the new error case's
+exception. (GH-13044)
+
+Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
+
+(cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619)
+
+Notes on backport to Python 2.7:
+
+* test_urllib tests urllib.urlopen() which quotes the URL and so is
+  not vulerable to HTTP Header Injection.
+* Add tests to test_urllib2 on urllib2.urlopen().
+* Reject non-ASCII characters: range 0x80-0xff.
+
+Upstream-Status: Backport
+CVE: CVE-2019-9740
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ Lib/httplib.py                                | 16 ++++++
+ Lib/test/test_urllib.py                       | 25 +++++++++
+ Lib/test/test_urllib2.py                      | 51 ++++++++++++++++++-
+ Lib/test/test_xmlrpc.py                       |  8 ++-
+ .../2019-04-10-08-53-30.bpo-30458.51E-DA.rst  |  1 +
+ 5 files changed, 99 insertions(+), 2 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
+
+diff --git a/Lib/httplib.py b/Lib/httplib.py
+index 60a8fb4e355f..1b41c346e090 100644
+--- a/Lib/httplib.py
++++ b/Lib/httplib.py
+@@ -247,6 +247,16 @@
+ _is_legal_header_name = re.compile(r'\A[^:\s][^:\r\n]*\Z').match
+ _is_illegal_header_value = re.compile(r'\n(?![ \t])|\r(?![ \t\n])').search
+ 
++# These characters are not allowed within HTTP URL paths.
++#  See https://tools.ietf.org/html/rfc3986#section-3.3 and the
++#  https://tools.ietf.org/html/rfc3986#appendix-A pchar definition.
++# Prevents CVE-2019-9740.  Includes control characters such as \r\n.
++# Restrict non-ASCII characters above \x7f (0x80-0xff).
++_contains_disallowed_url_pchar_re = re.compile('[\x00-\x20\x7f-\xff]')
++# Arguably only these _should_ allowed:
++#  _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$")
++# We are more lenient for assumed real world compatibility purposes.
++
+ # We always set the Content-Length header for these methods because some
+ # servers will otherwise respond with a 411
+ _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
+@@ -927,6 +937,12 @@ def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
+         self._method = method
+         if not url:
+             url = '/'
++        # Prevent CVE-2019-9740.
++        match = _contains_disallowed_url_pchar_re.search(url)
++        if match:
++            raise InvalidURL("URL can't contain control characters. %r "
++                             "(found at least %r)"
++                             % (url, match.group()))
+         hdr = '%s %s %s' % (method, url, self._http_vsn_str)
+ 
+         self._output(hdr)
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 1ce9201c0693..d7778d4194f3 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -257,6 +257,31 @@ def test_url_fragment(self):
+         finally:
+             self.unfakehttp()
+ 
++    def test_url_with_control_char_rejected(self):
++        for char_no in range(0, 0x21) + range(0x7f, 0x100):
++            char = chr(char_no)
++            schemeless_url = "//localhost:7777/test%s/" % char
++            self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++            try:
++                # urllib quotes the URL so there is no injection.
++                resp = urllib.urlopen("http:" + schemeless_url)
++                self.assertNotIn(char, resp.geturl())
++            finally:
++                self.unfakehttp()
++
++    def test_url_with_newline_header_injection_rejected(self):
++        self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++        host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
++        schemeless_url = "//" + host + ":8080/test/?test=a"
++        try:
++            # urllib quotes the URL so there is no injection.
++            resp = urllib.urlopen("http:" + schemeless_url)
++            self.assertNotIn(' ', resp.geturl())
++            self.assertNotIn('\r', resp.geturl())
++            self.assertNotIn('\n', resp.geturl())
++        finally:
++            self.unfakehttp()
++
+     def test_read_bogus(self):
+         # urlopen() should raise IOError for many error codes.
+         self.fakehttp('''HTTP/1.1 401 Authentication Required
+diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
+index 6d24d5ddf83c..9531818e16b2 100644
+--- a/Lib/test/test_urllib2.py
++++ b/Lib/test/test_urllib2.py
+@@ -15,6 +15,9 @@
+ except ImportError:
+     ssl = None
+ 
++from test.test_urllib import FakeHTTPMixin
++
++
+ # XXX
+ # Request
+ # CacheFTPHandler (hard to write)
+@@ -1262,7 +1265,7 @@ def _test_basic_auth(self, opener, auth_handler, auth_header,
+         self.assertEqual(len(http_handler.requests), 1)
+         self.assertFalse(http_handler.requests[0].has_header(auth_header))
+ 
+-class MiscTests(unittest.TestCase):
++class MiscTests(unittest.TestCase, FakeHTTPMixin):
+ 
+     def test_build_opener(self):
+         class MyHTTPHandler(urllib2.HTTPHandler): pass
+@@ -1317,6 +1320,52 @@ def test_unsupported_algorithm(self):
+             "Unsupported digest authentication algorithm 'invalid'"
+         )
+ 
++    @unittest.skipUnless(ssl, "ssl module required")
++    def test_url_with_control_char_rejected(self):
++        for char_no in range(0, 0x21) + range(0x7f, 0x100):
++            char = chr(char_no)
++            schemeless_url = "//localhost:7777/test%s/" % char
++            self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++            try:
++                # We explicitly test urllib.request.urlopen() instead of the top
++                # level 'def urlopen()' function defined in this... (quite ugly)
++                # test suite.  They use different url opening codepaths.  Plain
++                # urlopen uses FancyURLOpener which goes via a codepath that
++                # calls urllib.parse.quote() on the URL which makes all of the
++                # above attempts at injection within the url _path_ safe.
++                escaped_char_repr = repr(char).replace('\\', r'\\')
++                InvalidURL = httplib.InvalidURL
++                with self.assertRaisesRegexp(
++                    InvalidURL, "contain control.*" + escaped_char_repr):
++                    urllib2.urlopen("http:" + schemeless_url)
++                with self.assertRaisesRegexp(
++                    InvalidURL, "contain control.*" + escaped_char_repr):
++                    urllib2.urlopen("https:" + schemeless_url)
++            finally:
++                self.unfakehttp()
++
++    @unittest.skipUnless(ssl, "ssl module required")
++    def test_url_with_newline_header_injection_rejected(self):
++        self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
++        host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
++        schemeless_url = "//" + host + ":8080/test/?test=a"
++        try:
++            # We explicitly test urllib2.urlopen() instead of the top
++            # level 'def urlopen()' function defined in this... (quite ugly)
++            # test suite.  They use different url opening codepaths.  Plain
++            # urlopen uses FancyURLOpener which goes via a codepath that
++            # calls urllib.parse.quote() on the URL which makes all of the
++            # above attempts at injection within the url _path_ safe.
++            InvalidURL = httplib.InvalidURL
++            with self.assertRaisesRegexp(
++                InvalidURL, r"contain control.*\\r.*(found at least . .)"):
++                urllib2.urlopen("http:" + schemeless_url)
++            with self.assertRaisesRegexp(InvalidURL, r"contain control.*\\n"):
++                urllib2.urlopen("https:" + schemeless_url)
++        finally:
++            self.unfakehttp()
++
++
+ 
+ class RequestTests(unittest.TestCase):
+ 
+diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
+index 36b3be67fd6b..90ccb30716ff 100644
+--- a/Lib/test/test_xmlrpc.py
++++ b/Lib/test/test_xmlrpc.py
+@@ -659,7 +659,13 @@ def test_dotted_attribute(self):
+     def test_partial_post(self):
+         # Check that a partial POST doesn't make the server loop: issue #14001.
+         conn = httplib.HTTPConnection(ADDR, PORT)
+-        conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
++        conn.send('POST /RPC2 HTTP/1.0\r\n'
++                  'Content-Length: 100\r\n\r\n'
++                  'bye HTTP/1.1\r\n'
++                  'Host: %s:%s\r\n'
++                  'Accept-Encoding: identity\r\n'
++                  'Content-Length: 0\r\n\r\n'
++                  % (ADDR, PORT))
+         conn.close()
+ 
+ class SimpleServerEncodingTestCase(BaseServerTestCase):
+diff --git a/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
+new file mode 100644
+index 000000000000..47cb899df1af
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst
+@@ -0,0 +1 @@
++Address CVE-2019-9740 by disallowing URL paths with embedded whitespace or control characters through into the underlying http client request.  Such potentially malicious header injection URLs now cause an httplib.InvalidURL exception to be raised.
diff --git a/poky/meta/recipes-devtools/python/python3-dbus_1.2.8.bb b/poky/meta/recipes-devtools/python/python3-dbus_1.2.8.bb
index c9bf8df..923da3c 100644
--- a/poky/meta/recipes-devtools/python/python3-dbus_1.2.8.bb
+++ b/poky/meta/recipes-devtools/python/python3-dbus_1.2.8.bb
@@ -3,7 +3,7 @@
 HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b03240518994df6d8c974675675e5ca4"
-DEPENDS = "expat dbus dbus-glib virtual/libintl"
+DEPENDS = "expat dbus glib-2.0 virtual/libintl"
 
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
 "
diff --git a/poky/meta/recipes-devtools/python/python3-docutils_0.14.bb b/poky/meta/recipes-devtools/python/python3-docutils_0.15.bb
similarity index 73%
rename from poky/meta/recipes-devtools/python/python3-docutils_0.14.bb
rename to poky/meta/recipes-devtools/python/python3-docutils_0.15.bb
index 81a449d..f5c3f5d 100644
--- a/poky/meta/recipes-devtools/python/python3-docutils_0.14.bb
+++ b/poky/meta/recipes-devtools/python/python3-docutils_0.15.bb
@@ -7,12 +7,11 @@
 DEPENDS = "python3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "c53768d63db3873b7d452833553469de"
-SRC_URI[sha256sum] = "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274"
+SRC_URI[md5sum] = "f51729f19e70a9dc4837433193a5e798"
+SRC_URI[sha256sum] = "c35e87e985f70106f6f97e050f3bed990641e0e104566134b9cd23849a460e96"
 
 S = "${WORKDIR}/docutils-${PV}"
 
 inherit distutils3
 
 BBCLASSEXTEND = "native"
-
diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.0.10.bb b/poky/meta/recipes-devtools/python/python3-mako_1.0.10.bb
deleted file mode 100644
index 17803f1..0000000
--- a/poky/meta/recipes-devtools/python/python3-mako_1.0.10.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-inherit setuptools3
-require python-mako.inc
-
diff --git a/poky/meta/recipes-devtools/python/python3-mako_1.0.14.bb b/poky/meta/recipes-devtools/python/python3-mako_1.0.14.bb
new file mode 100644
index 0000000..d2f5188
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-mako_1.0.14.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Templating library for Python"
+HOMEPAGE = "http://www.makotemplates.org/"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=df7e6c7c82990acf0228a55e00d29bc9"
+
+PYPI_PACKAGE = "Mako"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "e162578170331f0cc6a4adb063c7c0f6"
+SRC_URI[sha256sum] = "f5a642d8c5699269ab62a68b296ff990767eb120f51e2e8f3d6afb16bdb57f4b"
+
+RDEPENDS_${PN} = "${PYTHON_PN}-html \
+                  ${PYTHON_PN}-netclient \
+                  ${PYTHON_PN}-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb
deleted file mode 100644
index ed6832e..0000000
--- a/poky/meta/recipes-devtools/python/python3-pbr_5.2.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-inherit setuptools3
-require python-pbr.inc
-SRC_URI[md5sum] = "2bca008fd08d035a2f78c606d876a6db"
-SRC_URI[sha256sum] = "d950c64aeea5456bbd147468382a5bb77fe692c13c9f00f0219814ce5b642755"
-
diff --git a/poky/meta/recipes-devtools/python/python3-pbr_5.4.1.bb b/poky/meta/recipes-devtools/python/python3-pbr_5.4.1.bb
new file mode 100644
index 0000000..338ac8b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3-pbr_5.4.1.bb
@@ -0,0 +1,5 @@
+inherit setuptools3
+require python-pbr.inc
+
+SRC_URI[md5sum] = "ab6e26026ab306989a636ec2d50a435a"
+SRC_URI[sha256sum] = "0ca44dc9fd3b04a22297c2a91082d8df2894862e8f4c86a49dac69eae9e85ca0"
diff --git a/poky/meta/recipes-devtools/python/python3-pygobject_3.32.1.bb b/poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb
similarity index 87%
rename from poky/meta/recipes-devtools/python/python3-pygobject_3.32.1.bb
rename to poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb
index 8eda06e..05688be 100644
--- a/poky/meta/recipes-devtools/python/python3-pygobject_3.32.1.bb
+++ b/poky/meta/recipes-devtools/python/python3-pygobject_3.32.2.bb
@@ -9,16 +9,16 @@
 DEPENDS += "python3 glib-2.0"
 
 SRCNAME="pygobject"
+
 SRC_URI = " \
     http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
     file://0001-Do-not-build-tests.patch \
 "
+SRC_URI[md5sum] = "92ffa25351782feb96362f0dace2089f"
+SRC_URI[sha256sum] = "c39ca2a28364b57fa00549c6e836346031e6b886c3ceabfd8ab4b4fed0a83611"
 
 UNKNOWN_CONFIGURE_WHITELIST = "introspection"
 
-SRC_URI[md5sum] = "9d5dbca10162dd9b0d03fed0c6cf865d"
-SRC_URI[sha256sum] = "32c99def94b8dea5ce9e4bc99576ef87591ea779b4db77cfdca7af81b76d04d8"
-
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
diff --git a/poky/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb b/poky/meta/recipes-devtools/python/python3-scons-native_3.1.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/python/python3-scons-native_3.0.5.bb
rename to poky/meta/recipes-devtools/python/python3-scons-native_3.1.0.bb
diff --git a/poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb b/poky/meta/recipes-devtools/python/python3-scons_3.1.0.bb
similarity index 82%
rename from poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb
rename to poky/meta/recipes-devtools/python/python3-scons_3.1.0.bb
index 7fb75a6..f1545da 100644
--- a/poky/meta/recipes-devtools/python/python3-scons_3.0.5.bb
+++ b/poky/meta/recipes-devtools/python/python3-scons_3.1.0.bb
@@ -4,8 +4,8 @@
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=37bb53a08e6beaea0c90e7821d731284"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-SRC_URI[md5sum] = "9f9c163e8bd48cf8cd92f03e85ca6395"
-SRC_URI[sha256sum] = "df676f23dc6d4bfa384fc389d95dcd21ab907e6349d4c848958ba4befb73c73e"
+SRC_URI[md5sum] = "e2fe9d16f81b0285b969238af4b552ff"
+SRC_URI[sha256sum] = "f3f548d738d4a2179123ecd744271ec413b2d55735ea7625a59b1b59e6cd132f"
 
 S = "${WORKDIR}/scons-${PV}"
 
diff --git a/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch b/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
new file mode 100644
index 0000000..957839b
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python3/0001-Use-FLAG_REF-always-for-interned-strings.patch
@@ -0,0 +1,35 @@
+From 6c8ea7c1dacd42f3ba00440231ec0e6b1a38300d Mon Sep 17 00:00:00 2001
+From: Inada Naoki <songofacandy@gmail.com>
+Date: Sat, 14 Jul 2018 00:46:11 +0900
+Subject: [PATCH] Use FLAG_REF always for interned strings
+
+Upstream-Status: Submitted [https://github.com/python/cpython/pull/8226]
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ Python/marshal.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/Python/marshal.c b/Python/marshal.c
+index 6d06266c6a..51db2e3b2e 100644
+--- a/Python/marshal.c
++++ b/Python/marshal.c
+@@ -275,9 +275,14 @@ w_ref(PyObject *v, char *flag, WFILE *p)
+     if (p->version < 3 || p->hashtable == NULL)
+         return 0; /* not writing object references */
+ 
+-    /* if it has only one reference, it definitely isn't shared */
+-    if (Py_REFCNT(v) == 1)
++    /* If it has only one reference, it definitely isn't shared.
++     * But we use TYPE_REF always for interned string, to PYC file stable
++     * as possible.
++     */
++    if (Py_REFCNT(v) == 1 &&
++            !(PyUnicode_CheckExact(v) && PyUnicode_CHECK_INTERNED(v))) {
+         return 0;
++    }
+ 
+     entry = _Py_HASHTABLE_GET_ENTRY(p->hashtable, v);
+     if (entry != NULL) {
+-- 
+2.21.0
+
diff --git a/poky/meta/recipes-devtools/python/python3_3.7.3.bb b/poky/meta/recipes-devtools/python/python3_3.7.4.bb
similarity index 97%
rename from poky/meta/recipes-devtools/python/python3_3.7.3.bb
rename to poky/meta/recipes-devtools/python/python3_3.7.4.bb
index 3409d94..a63abfd 100644
--- a/poky/meta/recipes-devtools/python/python3_3.7.3.bb
+++ b/poky/meta/recipes-devtools/python/python3_3.7.4.bb
@@ -26,6 +26,7 @@
 	   file://0001-bpo-36852-proper-detection-of-mips-architecture-for-.patch \
 	   file://crosspythonpath.patch \
            file://reformat_sysconfig.py \
+           file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
            "
 
 SRC_URI_append_class-native = " \
@@ -36,8 +37,8 @@
            file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \
            "
 
-SRC_URI[md5sum] = "93df27aec0cd18d6d42173e601ffbbfd"
-SRC_URI[sha256sum] = "da60b54064d4cfcd9c26576f6df2690e62085123826cff2e667e72a91952d318"
+SRC_URI[md5sum] = "d33e4aae66097051c2eca45ee3604803"
+SRC_URI[sha256sum] = "fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
diff --git a/poky/meta/recipes-devtools/python/python_2.7.16.bb b/poky/meta/recipes-devtools/python/python_2.7.16.bb
index 5f387b8..c093f84 100644
--- a/poky/meta/recipes-devtools/python/python_2.7.16.bb
+++ b/poky/meta/recipes-devtools/python/python_2.7.16.bb
@@ -30,10 +30,6 @@
            file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
            file://float-endian.patch \
            file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
-    file://bpo-35907-cve-2019-9948.patch \
-    file://bpo-35907-cve-2019-9948-fix.patch \
-    file://bpo-36216-cve-2019-9636.patch \
-    file://bpo-36216-cve-2019-9636-fix.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
diff --git a/poky/meta/recipes-devtools/qemu/qemu-native.inc b/poky/meta/recipes-devtools/qemu/qemu-native.inc
index 34ab8e6..c04297c 100644
--- a/poky/meta/recipes-devtools/qemu/qemu-native.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu-native.inc
@@ -6,7 +6,6 @@
             file://0011-fix-libcap-header-issue-on-some-distro.patch \
             file://0012-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \
             "
-EXTRA_OECONF_append = " --python=python2.7"
 
 EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
 
diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc
index ac475a8..7f0b3a7 100644
--- a/poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/poky/meta/recipes-devtools/qemu/qemu.inc
@@ -5,7 +5,7 @@
 RDEPENDS_${PN}-ptest = "bash make"
 
 require qemu-targets.inc
-inherit pkgconfig bluetooth ptest
+inherit pkgconfig ptest
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
@@ -24,6 +24,7 @@
            file://0009-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
            file://0010-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
            file://0013-target-arm-Fix-vector-operation-segfault.patch \
+	   file://CVE-2019-12155.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
@@ -77,6 +78,8 @@
 
 B = "${WORKDIR}/build"
 
+EXTRA_OECONF_append = " --python=${HOSTTOOLS_DIR}/python3"
+
 do_configure_prepend_class-native() {
 	# Append build host pkg-config paths for native target since the host may provide sdl
 	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
@@ -148,7 +151,7 @@
 PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
 PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
 PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
+PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez5"
 PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
 PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
 PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer"
diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-12155.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-12155.patch
new file mode 100644
index 0000000..c49a5e9
--- /dev/null
+++ b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-12155.patch
@@ -0,0 +1,35 @@
+From d52680fc932efb8a2f334cc6993e705ed1e31e99 Mon Sep 17 00:00:00 2001
+From: Prasad J Pandit <pjp@fedoraproject.org>
+Date: Thu, 25 Apr 2019 12:05:34 +0530
+Subject: [PATCH] qxl: check release info object
+
+When releasing spice resources in release_resource() routine,
+if release info object 'ext.info' is null, it leads to null
+pointer dereference. Add check to avoid it.
+
+Reported-by: Bugs SysSec <bugs-syssec@rub.de>
+Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
+Message-id: 20190425063534.32747-1-ppandit@redhat.com
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+
+Upstream-Status: Backport
+CVE: CVE-2019-12155
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ hw/display/qxl.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/hw/display/qxl.c b/hw/display/qxl.c
+index c8ce5781e03..632923add23 100644
+--- a/hw/display/qxl.c
++++ b/hw/display/qxl.c
+@@ -777,6 +777,9 @@ static void interface_release_resource(QXLInstance *sin,
+     QXLReleaseRing *ring;
+     uint64_t *item, id;
+ 
++    if (!ext.info) {
++        return;
++    }
+     if (ext.group_id == MEMSLOT_GROUP_HOST) {
+         /* host group -> vga mode update request */
+         QXLCommandExt *cmdext = (void *)(intptr_t)(ext.info->id);
diff --git a/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb b/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb
similarity index 100%
rename from poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb
rename to poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb
diff --git a/poky/meta/recipes-devtools/quilt/quilt.inc b/poky/meta/recipes-devtools/quilt/quilt.inc
index dbf722b..dcba62c 100644
--- a/poky/meta/recipes-devtools/quilt/quilt.inc
+++ b/poky/meta/recipes-devtools/quilt/quilt.inc
@@ -13,8 +13,8 @@
 
 SRC_URI_append_class-target = " file://gnu_patch_test_fix_target.patch"
 
-SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6"
-SRC_URI[sha256sum] = "f6cbc788e5cbbb381a3c6eab5b9efce67c776a8662a7795c7432fd27aa096819"
+SRC_URI[md5sum] = "6800c2404a2c0598ab2eff92a636ba70"
+SRC_URI[sha256sum] = "314b319a6feb13bf9d0f9ffa7ce6683b06919e734a41275087ea457cc9dc6e07"
 
 inherit autotools-brokensep ptest
 
diff --git a/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
index 21219a0..6d0f4ae 100644
--- a/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
+++ b/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
@@ -1,4 +1,4 @@
-From 1530138960cfafbeefb95f2a760954c00b4d0ef0 Mon Sep 17 00:00:00 2001
+From e9fa816677993e520adff8bba26cb3e71f5a6665 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Wed, 29 Mar 2017 15:11:59 +0300
 Subject: [PATCH] tests: Allow different output from mv
@@ -12,18 +12,18 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/test/failbackup.test b/test/failbackup.test
-index 37046f7..fce6725 100644
+index 5f0f54f..0902b12 100644
 --- a/test/failbackup.test
 +++ b/test/failbackup.test
 @@ -16,7 +16,7 @@ What happens when refresh fails because of a permission error?
  	$ cat > test.txt
  	< This is updated test.txt.
  	$ quilt refresh --backup
--	>~ mv: cannot move [`']?%{P}test.diff'? to [`']?%{P}test.diff~'?: Permission denied
+-	>~ mv: cannot move [`']?patches/test.diff'? to [`']?patches/test.diff~'?: Permission denied
 +	>~ mv: .*: Permission denied
  	$ echo %{?}
  	> 1
  
 -- 
-2.1.4
+2.17.1
 
diff --git a/poky/meta/recipes-devtools/quilt/quilt/run-ptest b/poky/meta/recipes-devtools/quilt/quilt/run-ptest
index 4b808ae..d2de5c8 100755
--- a/poky/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/poky/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -2,7 +2,7 @@
 
 THIS_SH=/bin/sh
 ln -sf /bin/ed /usr/bin/ed
-/usr/sbin/adduser --disabled-password quilttest
+/usr/sbin/adduser --disabled-password --gecos "" quilttest
 su -c "${THIS_SH} ./test.sh" quilttest
 /usr/sbin/deluser quilttest
 rm -f /usr/bin/ed
diff --git a/poky/meta/recipes-devtools/quilt/quilt_0.65.bb b/poky/meta/recipes-devtools/quilt/quilt_0.66.bb
similarity index 100%
rename from poky/meta/recipes-devtools/quilt/quilt_0.65.bb
rename to poky/meta/recipes-devtools/quilt/quilt_0.66.bb
diff --git a/poky/meta/recipes-devtools/rsync/files/CVE-2016-9840.patch b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9840.patch
new file mode 100644
index 0000000..7581887
--- /dev/null
+++ b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9840.patch
@@ -0,0 +1,75 @@
+From 6a043145ca6e9c55184013841a67b2fef87e44c0 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Wed, 21 Sep 2016 23:35:50 -0700
+Subject: [PATCH] Remove offset pointer optimization in inftrees.c.
+
+inftrees.c was subtracting an offset from a pointer to an array,
+in order to provide a pointer that allowed indexing starting at
+the offset. This is not compliant with the C standard, for which
+the behavior of a pointer decremented before its allocated memory
+is undefined. Per the recommendation of a security audit of the
+zlib code by Trail of Bits and TrustInSoft, in support of the
+Mozilla Foundation, this tiny optimization was removed, in order
+to avoid the possibility of undefined behavior.
+
+CVE: CVE-2016-9840
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ inftrees.c | 18 ++++++++----------
+ 1 file changed, 8 insertions(+), 10 deletions(-)
+
+diff --git a/zlib/inftrees.c b/zlib/inftrees.c
+index 22fcd666..0d2670d5 100644
+--- a/zlib/inftrees.c
++++ b/zlib/inftrees.c
+@@ -54,7 +54,7 @@ unsigned short FAR *work;
+     code FAR *next;             /* next available space in table */
+     const unsigned short FAR *base;     /* base value table to use */
+     const unsigned short FAR *extra;    /* extra bits table to use */
+-    int end;                    /* use base and extra for symbol > end */
++    unsigned match;             /* use base and extra for symbol >= match */
+     unsigned short count[MAXBITS+1];    /* number of codes of each length */
+     unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
+     static const unsigned short lbase[31] = { /* Length codes 257..285 base */
+@@ -181,19 +181,17 @@ unsigned short FAR *work;
+     switch (type) {
+     case CODES:
+         base = extra = work;    /* dummy value--not used */
+-        end = 19;
++        match = 20;
+         break;
+     case LENS:
+         base = lbase;
+-        base -= 257;
+         extra = lext;
+-        extra -= 257;
+-        end = 256;
++        match = 257;
+         break;
+     default:            /* DISTS */
+         base = dbase;
+         extra = dext;
+-        end = -1;
++        match = 0;
+     }
+ 
+     /* initialize state for loop */
+@@ -216,13 +214,13 @@ unsigned short FAR *work;
+     for (;;) {
+         /* create table entry */
+         here.bits = (unsigned char)(len - drop);
+-        if ((int)(work[sym]) < end) {
++        if (work[sym] + 1 < match) {
+             here.op = (unsigned char)0;
+             here.val = work[sym];
+         }
+-        else if ((int)(work[sym]) > end) {
+-            here.op = (unsigned char)(extra[work[sym]]);
+-            here.val = base[work[sym]];
++        else if (work[sym] >= match) {
++            here.op = (unsigned char)(extra[work[sym] - match]);
++            here.val = base[work[sym] - match];
+         }
+         else {
+             here.op = (unsigned char)(32 + 64);         /* end of block */
diff --git a/poky/meta/recipes-devtools/rsync/files/CVE-2016-9841.patch b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9841.patch
new file mode 100644
index 0000000..3942176
--- /dev/null
+++ b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9841.patch
@@ -0,0 +1,228 @@
+From 9aaec95e82117c1cb0f9624264c3618fc380cecb Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Wed, 21 Sep 2016 22:25:21 -0700
+Subject: [PATCH] Use post-increment only in inffast.c.
+
+An old inffast.c optimization turns out to not be optimal anymore
+with modern compilers, and furthermore was not compliant with the
+C standard, for which decrementing a pointer before its allocated
+memory is undefined. Per the recommendation of a security audit of
+the zlib code by Trail of Bits and TrustInSoft, in support of the
+Mozilla Foundation, this "optimization" was removed, in order to
+avoid the possibility of undefined behavior.
+
+CVE: CVE-2016-9841
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ zlib/inffast.c | 81 +++++++++++++++++++++----------------------------------
+ 1 file changed, 31 insertions(+), 50 deletions(-)
+
+diff --git a/zlib/inffast.c b/zlib/inffast.c
+index bda59ceb..f0d163db 100644
+--- a/zlib/inffast.c
++++ b/zlib/inffast.c
+@@ -10,25 +10,6 @@
+ 
+ #ifndef ASMINF
+ 
+-/* Allow machine dependent optimization for post-increment or pre-increment.
+-   Based on testing to date,
+-   Pre-increment preferred for:
+-   - PowerPC G3 (Adler)
+-   - MIPS R5000 (Randers-Pehrson)
+-   Post-increment preferred for:
+-   - none
+-   No measurable difference:
+-   - Pentium III (Anderson)
+-   - M68060 (Nikl)
+- */
+-#ifdef POSTINC
+-#  define OFF 0
+-#  define PUP(a) *(a)++
+-#else
+-#  define OFF 1
+-#  define PUP(a) *++(a)
+-#endif
+-
+ /*
+    Decode literal, length, and distance codes and write out the resulting
+    literal and match bytes until either not enough input or output is
+@@ -96,9 +77,9 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+ 
+     /* copy state to local variables */
+     state = (struct inflate_state FAR *)strm->state;
+-    in = strm->next_in - OFF;
++    in = strm->next_in;
+     last = in + (strm->avail_in - 5);
+-    out = strm->next_out - OFF;
++    out = strm->next_out;
+     beg = out - (start - strm->avail_out);
+     end = out + (strm->avail_out - 257);
+ #ifdef INFLATE_STRICT
+@@ -119,9 +100,9 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+        input data or output space */
+     do {
+         if (bits < 15) {
+-            hold += (unsigned long)(PUP(in)) << bits;
++            hold += (unsigned long)(*in++) << bits;
+             bits += 8;
+-            hold += (unsigned long)(PUP(in)) << bits;
++            hold += (unsigned long)(*in++) << bits;
+             bits += 8;
+         }
+         here = lcode[hold & lmask];
+@@ -134,14 +115,14 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+             Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+                     "inflate:         literal '%c'\n" :
+                     "inflate:         literal 0x%02x\n", here.val));
+-            PUP(out) = (unsigned char)(here.val);
++            *out++ = (unsigned char)(here.val);
+         }
+         else if (op & 16) {                     /* length base */
+             len = (unsigned)(here.val);
+             op &= 15;                           /* number of extra bits */
+             if (op) {
+                 if (bits < op) {
+-                    hold += (unsigned long)(PUP(in)) << bits;
++                    hold += (unsigned long)(*in++) << bits;
+                     bits += 8;
+                 }
+                 len += (unsigned)hold & ((1U << op) - 1);
+@@ -150,9 +131,9 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+             }
+             Tracevv((stderr, "inflate:         length %u\n", len));
+             if (bits < 15) {
+-                hold += (unsigned long)(PUP(in)) << bits;
++                hold += (unsigned long)(*in++) << bits;
+                 bits += 8;
+-                hold += (unsigned long)(PUP(in)) << bits;
++                hold += (unsigned long)(*in++) << bits;
+                 bits += 8;
+             }
+             here = dcode[hold & dmask];
+@@ -165,10 +146,10 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+                 dist = (unsigned)(here.val);
+                 op &= 15;                       /* number of extra bits */
+                 if (bits < op) {
+-                    hold += (unsigned long)(PUP(in)) << bits;
++                    hold += (unsigned long)(*in++) << bits;
+                     bits += 8;
+                     if (bits < op) {
+-                        hold += (unsigned long)(PUP(in)) << bits;
++                        hold += (unsigned long)(*in++) << bits;
+                         bits += 8;
+                     }
+                 }
+@@ -196,30 +177,30 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+ #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+                         if (len <= op - whave) {
+                             do {
+-                                PUP(out) = 0;
++                                *out++ = 0;
+                             } while (--len);
+                             continue;
+                         }
+                         len -= op - whave;
+                         do {
+-                            PUP(out) = 0;
++                            *out++ = 0;
+                         } while (--op > whave);
+                         if (op == 0) {
+                             from = out - dist;
+                             do {
+-                                PUP(out) = PUP(from);
++                                *out++ = *from++;
+                             } while (--len);
+                             continue;
+                         }
+ #endif
+                     }
+-                    from = window - OFF;
++                    from = window;
+                     if (wnext == 0) {           /* very common case */
+                         from += wsize - op;
+                         if (op < len) {         /* some from window */
+                             len -= op;
+                             do {
+-                                PUP(out) = PUP(from);
++                                *out++ = *from++;
+                             } while (--op);
+                             from = out - dist;  /* rest from output */
+                         }
+@@ -230,14 +211,14 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+                         if (op < len) {         /* some from end of window */
+                             len -= op;
+                             do {
+-                                PUP(out) = PUP(from);
++                                *out++ = *from++;
+                             } while (--op);
+-                            from = window - OFF;
++                            from = window;
+                             if (wnext < len) {  /* some from start of window */
+                                 op = wnext;
+                                 len -= op;
+                                 do {
+-                                    PUP(out) = PUP(from);
++                                    *out++ = *from++;
+                                 } while (--op);
+                                 from = out - dist;      /* rest from output */
+                             }
+@@ -248,35 +229,35 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+                         if (op < len) {         /* some from window */
+                             len -= op;
+                             do {
+-                                PUP(out) = PUP(from);
++                                *out++ = *from++;
+                             } while (--op);
+                             from = out - dist;  /* rest from output */
+                         }
+                     }
+                     while (len > 2) {
+-                        PUP(out) = PUP(from);
+-                        PUP(out) = PUP(from);
+-                        PUP(out) = PUP(from);
++                        *out++ = *from++;
++                        *out++ = *from++;
++                        *out++ = *from++;
+                         len -= 3;
+                     }
+                     if (len) {
+-                        PUP(out) = PUP(from);
++                        *out++ = *from++;
+                         if (len > 1)
+-                            PUP(out) = PUP(from);
++                            *out++ = *from++;
+                     }
+                 }
+                 else {
+                     from = out - dist;          /* copy direct from output */
+                     do {                        /* minimum length is three */
+-                        PUP(out) = PUP(from);
+-                        PUP(out) = PUP(from);
+-                        PUP(out) = PUP(from);
++                        *out++ = *from++;
++                        *out++ = *from++;
++                        *out++ = *from++;
+                         len -= 3;
+                     } while (len > 2);
+                     if (len) {
+-                        PUP(out) = PUP(from);
++                        *out++ = *from++;
+                         if (len > 1)
+-                            PUP(out) = PUP(from);
++                            *out++ = *from++;
+                     }
+                 }
+             }
+@@ -313,8 +294,8 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
+     hold &= (1U << bits) - 1;
+ 
+     /* update state and return */
+-    strm->next_in = in + OFF;
+-    strm->next_out = out + OFF;
++    strm->next_in = in;
++    strm->next_out = out;
+     strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
+     strm->avail_out = (unsigned)(out < end ?
+                                  257 + (end - out) : 257 - (out - end));
diff --git a/poky/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
new file mode 100644
index 0000000..810d8a3
--- /dev/null
+++ b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9842.patch
@@ -0,0 +1,33 @@
+From e54e1299404101a5a9d0cf5e45512b543967f958 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Sat, 5 Sep 2015 17:45:55 -0700
+Subject: [PATCH] Avoid shifts of negative values inflateMark().
+
+The C standard says that bit shifts of negative integers is
+undefined.  This casts to unsigned values to assure a known
+result.
+
+CVE: CVE-2016-9842
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ inflate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/zlib/inflate.c b/zlib/inflate.c
+index 2889e3a0..a7184167 100644
+--- a/zlib/inflate.c
++++ b/zlib/inflate.c
+@@ -1506,9 +1506,10 @@ z_streamp strm;
+ {
+     struct inflate_state FAR *state;
+ 
+-    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
++    if (strm == Z_NULL || strm->state == Z_NULL)
++        return (long)(((unsigned long)0 - 1) << 16);
+     state = (struct inflate_state FAR *)strm->state;
+-    return ((long)(state->back) << 16) +
++    return (long)(((unsigned long)((long)state->back)) << 16) +
+         (state->mode == COPY ? state->length :
+             (state->mode == MATCH ? state->was - state->length : 0));
+ }
diff --git a/poky/meta/recipes-devtools/rsync/files/CVE-2016-9843.patch b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9843.patch
new file mode 100644
index 0000000..ea2e42f
--- /dev/null
+++ b/poky/meta/recipes-devtools/rsync/files/CVE-2016-9843.patch
@@ -0,0 +1,53 @@
+From d1d577490c15a0c6862473d7576352a9f18ef811 Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Wed, 28 Sep 2016 20:20:25 -0700
+Subject: [PATCH] Avoid pre-decrement of pointer in big-endian CRC calculation.
+
+There was a small optimization for PowerPCs to pre-increment a
+pointer when accessing a word, instead of post-incrementing. This
+required prefacing the loop with a decrement of the pointer,
+possibly pointing before the object passed. This is not compliant
+with the C standard, for which decrementing a pointer before its
+allocated memory is undefined. When tested on a modern PowerPC
+with a modern compiler, the optimization no longer has any effect.
+Due to all that, and per the recommendation of a security audit of
+the zlib code by Trail of Bits and TrustInSoft, in support of the
+Mozilla Foundation, this "optimization" was removed, in order to
+avoid the possibility of undefined behavior.
+
+CVE: CVE-2016-9843
+Upstream-Status: Backport
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ crc32.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/zlib/crc32.c b/zlib/crc32.c
+index 979a7190..05733f4e 100644
+--- a/zlib/crc32.c
++++ b/zlib/crc32.c
+@@ -278,7 +278,7 @@ local unsigned long crc32_little(crc, buf, len)
+ }
+ 
+ /* ========================================================================= */
+-#define DOBIG4 c ^= *++buf4; \
++#define DOBIG4 c ^= *buf4++; \
+         c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
+             crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
+ #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
+@@ -300,7 +300,6 @@ local unsigned long crc32_big(crc, buf, len)
+     }
+ 
+     buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
+-    buf4--;
+     while (len >= 32) {
+         DOBIG32;
+         len -= 32;
+@@ -309,7 +308,6 @@ local unsigned long crc32_big(crc, buf, len)
+         DOBIG4;
+         len -= 4;
+     }
+-    buf4++;
+     buf = (const unsigned char FAR *)buf4;
+ 
+     if (len) do {
diff --git a/poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb b/poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
index 29cb231..ffb1d06 100644
--- a/poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
+++ b/poky/meta/recipes-devtools/rsync/rsync_3.1.3.bb
@@ -11,6 +11,10 @@
 SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
            file://rsyncd.conf \
            file://makefile-no-rebuild.patch \
+           file://CVE-2016-9840.patch \
+           file://CVE-2016-9841.patch \
+           file://CVE-2016-9842.patch \
+           file://CVE-2016-9843.patch \
 "
 
 SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"
diff --git a/poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb b/poky/meta/recipes-devtools/ruby/ruby_2.5.5.bb
similarity index 94%
rename from poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb
rename to poky/meta/recipes-devtools/ruby/ruby_2.5.5.bb
index 519daf2..8ad59a7 100644
--- a/poky/meta/recipes-devtools/ruby/ruby_2.5.3.bb
+++ b/poky/meta/recipes-devtools/ruby/ruby_2.5.5.bb
@@ -6,8 +6,8 @@
            file://run-ptest \
            "
 
-SRC_URI[md5sum] = "20c85b67846d49622ef3b24230803fef"
-SRC_URI[sha256sum] = "9828d03852c37c20fa333a0264f2490f07338576734d910ee3fd538c9520846c"
+SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400"
+SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c"
 
 # it's unknown to configure script, but then passed to extconf.rb
 # maybe it's not really needed as we're hardcoding the result with
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch
deleted file mode 100644
index a5bab05..0000000
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-mksquashfs.c-get-inline-functions-work-with-C99.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From ac6268e843c43286eebff2a1052182c2393cdb2e Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Mon, 14 Sep 2015 12:31:42 +0800
-Subject: [PATCH] mksquashfs.c:  get inline functions work with both gnu11 and gnu89
-
-Upstream-Status: Pending
-
-After gcc upgraded to gcc5, and if the codes is compiled without optimization(-O0),
-and the below error will happen:
-
-| mksquashfs.o: In function `create_inode':
-| git/squashfs-tools/mksquashfs.c:897: undefined reference to `get_inode_no'
-| git/squashfs-tools/mksquashfs.c:960: undefined reference to `get_parent_no'
-| git/squashfs-tools/mksquashfs.c:983: undefined reference to `get_parent_no'
-| mksquashfs.o: In function `reader_read_process':
-| git/squashfs-tools/mksquashfs.c:2132: undefined reference to `is_fragment'
-| mksquashfs.o: In function `reader_read_file':
-| git/squashfs-tools/mksquashfs.c:2228: undefined reference to `is_fragment'
-| mksquashfs.o: In function `dir_scan':
-| git/squashfs-tools/mksquashfs.c:3101: undefined reference to `create_dir_entry'
-
-gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that exactly one C
-source file has the callable copy of the inline function. Consider the following
-program:
-
-  inline int
-  foo (void)
-  {
-    return 42;
-  }
-
-  int
-  main (void)
-  {
-    return foo ();
-  }
-
-The program above will not link with the C99 inline semantics, because no out-of-line
-function foo is generated. To fix this, either mark the function foo as static, or
-add the following declaration:
-  static inline int foo (void);
-
-more information refer to: https://gcc.gnu.org/gcc-5/porting_to.html;
-
-but the use of "extern inline" will lead to the compilation issue if gcc is not
-gcc5, as the commit in oe-core d0af30c92fde [alsa-lib: Change function type to
-"static __inline__"]
-    "extern __inline__ function()" is the inlined version that
-    can be used in this compilation unit, but there will be another
-    definition of this function somewhere, so compiler will not emit
-    any code for the function body. This causes problem in -O0,
-    where functions are never inlined, the function call is preserved,
-    but linker can't find the symbol, thus the error happens.
-
-so replace "inline" with "static inline" to make it work with both gnu11 and gnu89
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- squashfs-tools/mksquashfs.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
-index d221c35..6bba1d2 100644
---- a/squashfs-tools/mksquashfs.c
-+++ b/squashfs-tools/mksquashfs.c
-@@ -828,13 +828,13 @@ char *subpathname(struct dir_ent *dir_ent)
- }
- 
- 
--inline unsigned int get_inode_no(struct inode_info *inode)
-+static inline unsigned int get_inode_no(struct inode_info *inode)
- {
- 	return inode->inode_number;
- }
- 
- 
--inline unsigned int get_parent_no(struct dir_info *dir)
-+static inline unsigned int get_parent_no(struct dir_info *dir)
- {
- 	return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no;
- }
-@@ -2027,7 +2027,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
- }
- 
- 
--inline int is_fragment(struct inode_info *inode)
-+static inline int is_fragment(struct inode_info *inode)
- {
- 	off_t file_size = inode->buf.st_size;
- 
-@@ -2996,13 +2996,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id)
- }
- 
- 
--inline struct inode_info *lookup_inode(struct stat *buf)
-+static inline struct inode_info *lookup_inode(struct stat *buf)
- {
- 	return lookup_inode2(buf, 0, 0);
- }
- 
- 
--inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
-+static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
- {
- 	if (inode->inode_number == 0) {
- 		inode->inode_number = use_this ? : inode_no ++;
-@@ -3013,7 +3013,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
- }
- 
- 
--inline struct dir_ent *create_dir_entry(char *name, char *source_name,
-+static inline struct dir_ent *create_dir_entry(char *name, char *source_name,
- 	char *nonstandard_pathname, struct dir_info *dir)
- {
- 	struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent));
-@@ -3031,7 +3031,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name,
- }
- 
- 
--inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
-+static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
- 	struct inode_info *inode_info)
- {
- 	struct dir_info *dir = dir_ent->our_dir;
-@@ -3047,7 +3047,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
- }
- 
- 
--inline void add_dir_entry2(char *name, char *source_name,
-+static inline void add_dir_entry2(char *name, char *source_name,
- 	char *nonstandard_pathname, struct dir_info *sub_dir,
- 	struct inode_info *inode_info, struct dir_info *dir)
- {
-@@ -3059,7 +3059,7 @@ inline void add_dir_entry2(char *name, char *source_name,
- }
- 
- 
--inline void free_dir_entry(struct dir_ent *dir_ent)
-+static inline void free_dir_entry(struct dir_ent *dir_ent)
- {
- 	if(dir_ent->name)
- 		free(dir_ent->name);
-@@ -3080,7 +3080,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent)
- }
- 
- 
--inline void add_excluded(struct dir_info *dir)
-+static inline void add_excluded(struct dir_info *dir)
- {
- 	dir->excluded ++;
- }
--- 
-1.9.1
-
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch
deleted file mode 100644
index 2261ea9..0000000
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 3c0d67184d6edb63f3b7d6d5eb81531daa6388f3 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Tue, 28 Aug 2018 16:25:36 +0800
-Subject: [PATCH] squashfs-tools: patch for CVE-2015-4645(6)
-
-Upstream-Status: Backport[https://github.com/devttys0/sasquatch/pull/
-                 5/commits/6777e08cc38bc780d27c69c1d8c272867b74524f]
-
-CVE: CVE-2015-4645 CVE-2015-4646
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- squashfs-tools/unsquash-4.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
-index ecdaac7..692ae25 100644
---- a/squashfs-tools/unsquash-4.c
-+++ b/squashfs-tools/unsquash-4.c
-@@ -31,9 +31,9 @@ static unsigned int *id_table;
- int read_fragment_table_4(long long *directory_table_end)
- {
- 	int res, i;
--	int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
--	int  indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
--	long long fragment_table_index[indexes];
-+	size_t bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
-+	size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
-+	long long *fragment_table_index;
- 
- 	TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
- 		"from 0x%llx\n", sBlk.s.fragments, indexes,
-@@ -43,6 +43,11 @@ int read_fragment_table_4(long long *directory_table_end)
- 		*directory_table_end = sBlk.s.fragment_table_start;
- 		return TRUE;
- 	}
-+        
-+	fragment_table_index = malloc(indexes*sizeof(long long));
-+	if(fragment_table_index == NULL)
-+		EXIT_UNSQUASH("read_fragment_table: failed to allocate "
-+			"fragment table index\n");
- 
- 	fragment_table = malloc(bytes);
- 	if(fragment_table == NULL)
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
deleted file mode 100644
index 87c1e8c..0000000
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-include missing sys/stat.h for stat* function declarations
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: squashfs-tools/pseudo.c
-===================================================================
---- squashfs-tools.orig/pseudo.c
-+++ squashfs-tools/pseudo.c
-@@ -32,6 +32,7 @@
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-+#include <sys/stat.h>
- #include <ctype.h>
- 
- #include "pseudo.h"
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch
index 39521a7..f2e88f4 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch
@@ -19,7 +19,7 @@
  #include "squashfs_fs.h"
 --- a/squashfs-tools/unsquashfs.c
 +++ b/squashfs-tools/unsquashfs.c
-@@ -38,6 +38,10 @@
+@@ -40,6 +40,10 @@
  #include <limits.h>
  #include <ctype.h>
  
diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index dc1568a..ab2ff01 100644
--- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -6,12 +6,9 @@
 LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 PV = "4.3+gitr${SRCPV}"
-SRCREV = "9c1db6d13a51a2e009f0027ef336ce03624eac0d"
+SRCREV = "f95864afe8833fe3ad782d714b41378e860977b1"
 SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
-           file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
            file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \
-           file://fix-compat.patch \
-           file://0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch;striplevel=2 \
 "
 UPSTREAM_CHECK_COMMITS = "1"
 SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
@@ -24,13 +21,15 @@
 
 EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}"
 
-PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr"
+PACKAGECONFIG ??= "gzip xz lzo lz4 lzma xattr reproducible"
 PACKAGECONFIG[gzip] = "GZIP_SUPPORT=1,GZIP_SUPPORT=0,zlib"
 PACKAGECONFIG[xz] = "XZ_SUPPORT=1,XZ_SUPPORT=0,xz"
 PACKAGECONFIG[lzo] = "LZO_SUPPORT=1,LZO_SUPPORT=0,lzo"
 PACKAGECONFIG[lz4] = "LZ4_SUPPORT=1,LZ4_SUPPORT=0,lz4"
 PACKAGECONFIG[lzma] = "LZMA_XZ_SUPPORT=1,LZMA_XZ_SUPPORT=0,xz"
 PACKAGECONFIG[xattr] = "XATTR_SUPPORT=1,XATTR_SUPPORT=0,attr"
+PACKAGECONFIG[zstd] = "ZSTD_SUPPORT=1,ZSTD_SUPPORT=0,zstd"
+PACKAGECONFIG[reproducible] = "REPRODUCIBLE_DEFAULT=1,REPRODUCIBLE_DEFAULT=0,"
 
 do_compile() {
 	oe_runmake mksquashfs unsquashfs
diff --git a/poky/meta/recipes-devtools/strace/strace_4.26.bb b/poky/meta/recipes-devtools/strace/strace_4.26.bb
index 3b61fc3..2688724 100644
--- a/poky/meta/recipes-devtools/strace/strace_4.26.bb
+++ b/poky/meta/recipes-devtools/strace/strace_4.26.bb
@@ -20,13 +20,13 @@
 SRC_URI[md5sum] = "daa51acc0c7c696221ec03cf0b30a7af"
 SRC_URI[sha256sum] = "7c4d2ffeef4f7d1cdc71062ca78d1130eb52f947c2fca82f59f6a1183bfa1e1c"
 
-inherit autotools ptest bluetooth
+inherit autotools ptest
 
 PACKAGECONFIG_class-target ??= "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
 "
 
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
+PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,bluez5"
 PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
 
 EXTRA_OECONF += "--enable-mpers=no"
diff --git a/poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb b/poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb
index f059ff9..3d0f3e6 100644
--- a/poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb
+++ b/poky/meta/recipes-devtools/subversion/subversion_1.12.0.bb
@@ -19,6 +19,8 @@
 
 inherit autotools pkgconfig gettext
 
+CVE_PRODUCT = "apache:subversion"
+
 PACKAGECONFIG ?= ""
 
 PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
diff --git a/poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
similarity index 63%
rename from poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
rename to poky/meta/recipes-devtools/unfs3/unfs3_git.bb
index 5a81a8f..a4ac46c 100644
--- a/poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
+++ b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb
@@ -3,24 +3,14 @@
 LICENSE = "unfs3"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=9475885294e17c0cc0067820d042792e"
 
-# SVN support for upstream version check isn't implemented yet
-RECIPE_UPSTREAM_VERSION = "0.9.22.r497"
-RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
-CHECK_DATE = "Dec 10, 2015"
-
 DEPENDS = "flex-native bison-native flex"
 DEPENDS += "libtirpc"
 DEPENDS_append_class-nativesdk = " flex-nativesdk"
 
 ASNEEDED = ""
 
-MOD_PV = "497"
-S = "${WORKDIR}/trunk"
-# Only subversion url left in OE-Core, use a mirror tarball instead since
-# this rarely changes.
-# svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http
-# rename the tarball in mirror to avoid clash with user local svn tarball
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/unfs3-0.9.22.r497.tar.gz \
+S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \
            file://unfs3_parallel_build.patch \
            file://alternate_rpc_ports.patch \
            file://fix_pid_race_parent_writes_child_pid.patch \
@@ -31,8 +21,10 @@
            file://0001-daemon.c-Libtirpc-porting-fixes.patch \
            file://0001-attr-fix-utime-for-symlink.patch \
           "
-SRC_URI[md5sum] = "2e43e471c77ade0331901c40b8f8e9a3"
-SRC_URI[sha256sum] = "21009468a9ba07b72ea93780d025a63ab4e55bf8fc3127803c296f0900fe1bac"
+SRCREV = "c12a5c69a8d59be6916cbd0e0f41c159f1962425"
+UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>.+)"
+
+PV = "0.9.22+${SRCPV}"
 
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
index 85f0ff7..4e89c60 100644
--- a/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
+++ b/poky/meta/recipes-devtools/valgrind/valgrind_3.15.0.bb
@@ -7,8 +7,7 @@
                     file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \
                     file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
 
-X11DEPENDS = "virtual/libx11"
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
+DEPENDS = " \
            ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
         "
 
diff --git a/poky/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch b/poky/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch
new file mode 100644
index 0000000..1ef797d
--- /dev/null
+++ b/poky/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch
@@ -0,0 +1,44 @@
+From e174b6e7d195d5a7465575641b7f68581f162574 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 27 Jun 2019 13:10:47 +0800
+Subject: [PATCH] dc: fix exit code of q command
+
+The exit code for "echo q | dc" is 1 for dc-1.4.1;
+while the exit code for "echo q | dc" is 0 for dc-1.4.
+
+Here is the answer from ken@gnu.org:
+dc-1.4 was right.  There was a rewrite of a chunk of code for 1.4.1 to
+fix a corner case in the Q command, and somehow the placement of the
+clean-up label for the 'q' command got misplaced on the error-handling
+branch instead of the clean-exit branch.  The patch below fixes this
+(it is committed for whenever the next bc/dc release gets made).
+
+Thanks for the report,
+        --Ken Pizzini
+
+Upstream-Status: Backport [Got the solution from maintainer]
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ dc/eval.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dc/eval.c b/dc/eval.c
+index 05a3d9e..bcab8db 100644
+--- a/dc/eval.c
++++ b/dc/eval.c
+@@ -814,10 +814,10 @@ error_fail:
+ 	fprintf(stderr, "%s: ", progname);
+ 	perror("error reading input");
+ 	return DC_FAIL;
+-reset_and_exit_quit:
+ reset_and_exit_fail:
+ 	signal(SIGINT, sigint_default);
+ 	return DC_FAIL;
++reset_and_exit_quit:
+ reset_and_exit_success:
+ 	signal(SIGINT, sigint_default);
+ 	return DC_SUCCESS;
+-- 
+1.9.1
+
diff --git a/poky/meta/recipes-extended/bc/bc_1.07.1.bb b/poky/meta/recipes-extended/bc/bc_1.07.1.bb
index 809b864..4a51302 100644
--- a/poky/meta/recipes-extended/bc/bc_1.07.1.bb
+++ b/poky/meta/recipes-extended/bc/bc_1.07.1.bb
@@ -13,7 +13,8 @@
 
 SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
            file://no-gen-libmath.patch \
-           file://libmath.h"
+           file://libmath.h \
+           file://0001-dc-fix-exit-code-of-q-command.patch"
 SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc"
 SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a"
 
diff --git a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch b/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch
deleted file mode 100644
index 1d0c3a6..0000000
--- a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Backport
-https://bugzilla.suse.com/attachment.cgi?id=681334
-
-CVE: CVE-2016-3189
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: bzip2-1.0.6/bzip2recover.c
-===================================================================
---- bzip2-1.0.6.orig/bzip2recover.c
-+++ bzip2-1.0.6/bzip2recover.c
-@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv )
-             bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
-             bsPutUInt32 ( bsWr, blockCRC );
-             bsClose ( bsWr );
-+            outFile = NULL;
-          }
-          if (wrBlock >= rbCtr) break;
-          wrBlock++;
diff --git a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch b/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
deleted file mode 100644
index ece90d9..0000000
--- a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/fix-bunzip2-qt-returns-0-for-corrupt-archives.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 8068659388127e8e63f2d2297ba2348c72b20705 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Mon, 12 Oct 2015 03:19:51 -0400
-Subject: [PATCH] bzip2: fix bunzip2 -qt returns 0 for corrupt archives
-
-"bzip2 -t FILE" returns 2 if FILE exists, but is not a valid bzip2 file.
-"bzip2 -qt FILE" returns 0 when this happens, although it does print out
-an error message as is does so.
-
-This has been fix by Debian, just port changes from Debian patch file
-"20-legacy.patch".
-
-Debian defect:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279025
-
-Fix item from changelog:
-http://archive.debian.net/changelogs/pool/main/b/bzip2/bzip2_1.0.2-7/changelog
-
-  * Fixed "bunzip2 -qt returns 0 for corrupt archives" (Closes: #279025).
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- bzip2.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/bzip2.c b/bzip2.c
-index 6de9d1d..f2ce668 100644
---- a/bzip2.c
-+++ b/bzip2.c
-@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
-             testf ( aa->name );
- 	 }
-       }
--      if (testFailsExist && noisy) {
--         fprintf ( stderr,
--           "\n"
--           "You can use the `bzip2recover' program to attempt to recover\n"
--           "data from undamaged sections of corrupted files.\n\n"
--         );
-+      if (testFailsExist) {
-+         if (noisy) {
-+            fprintf ( stderr,
-+              "\n"
-+              "You can use the `bzip2recover' program to attempt to recover\n"
-+              "data from undamaged sections of corrupted files.\n\n"
-+            );
-+         }
-          setExit(2);
-          exit(exitValue);
-       }
--- 
-1.9.1
-
diff --git a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/poky/meta/recipes-extended/bzip2/bzip2/Makefile.am
similarity index 100%
rename from poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
rename to poky/meta/recipes-extended/bzip2/bzip2/Makefile.am
diff --git a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/poky/meta/recipes-extended/bzip2/bzip2/configure.ac
similarity index 100%
rename from poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
rename to poky/meta/recipes-extended/bzip2/bzip2/configure.ac
diff --git a/poky/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/poky/meta/recipes-extended/bzip2/bzip2/run-ptest
similarity index 100%
rename from poky/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
rename to poky/meta/recipes-extended/bzip2/bzip2/run-ptest
diff --git a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/poky/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
similarity index 72%
rename from poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
rename to poky/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
index 15a8e51..73d933a 100644
--- a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/poky/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
@@ -5,21 +5,17 @@
 HOMEPAGE = "https://sourceware.org/bzip2/"
 SECTION = "console/utils"
 LICENSE = "bzip2"
-LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=39406315f540c69bd05b1531daedd2ae"
-PR = "r5"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"
 
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.gz \
-           file://fix-bunzip2-qt-returns-0-for-corrupt-archives.patch \
+SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
            file://configure.ac;subdir=${BP} \
            file://Makefile.am;subdir=${BP} \
            file://run-ptest \
-           file://CVE-2016-3189.patch \
            "
+SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
+SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
 
-SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
-SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
-
-UPSTREAM_CHECK_URI = "https://www.sourceware.org/bzip2/"
+UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 UPSTREAM_VERSION_UNKNOWN = "1"
 
 PACKAGES =+ "libbz2"
@@ -44,4 +40,3 @@
 
 PROVIDES_append_class-native = " bzip2-replacement-native"
 BBCLASSEXTEND = "native nativesdk"
-
diff --git a/poky/meta/recipes-extended/cups/cups.inc b/poky/meta/recipes-extended/cups/cups.inc
index 5010f08..46fb2dd 100644
--- a/poky/meta/recipes-extended/cups/cups.inc
+++ b/poky/meta/recipes-extended/cups/cups.inc
@@ -2,7 +2,7 @@
 HOMEPAGE = "https://www.cups.org/"
 SECTION = "console/utils"
 LICENSE = "GPLv2 & LGPLv2"
-DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb1"
+DEPENDS = "gnutls libpng jpeg dbus zlib libusb1"
 
 SRC_URI = "https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \
            file://use_echo_only_in_init.patch \
diff --git a/poky/meta/recipes-extended/ed/ed_1.15.bb b/poky/meta/recipes-extended/ed/ed_1.15.bb
index c793103..886c3dd 100644
--- a/poky/meta/recipes-extended/ed/ed_1.15.bb
+++ b/poky/meta/recipes-extended/ed/ed_1.15.bb
@@ -9,6 +9,8 @@
 
 SECTION = "base"
 
+CVE_PRODUCT = "gnu:ed"
+
 # LSB states that ed should be in /bin/
 bindir = "${base_bindir}"
 
diff --git a/poky/meta/recipes-extended/gawk/gawk_5.0.0.bb b/poky/meta/recipes-extended/gawk/gawk_5.0.1.bb
similarity index 90%
rename from poky/meta/recipes-extended/gawk/gawk_5.0.0.bb
rename to poky/meta/recipes-extended/gawk/gawk_5.0.1.bb
index 5789013..b3eb39e 100644
--- a/poky/meta/recipes-extended/gawk/gawk_5.0.0.bb
+++ b/poky/meta/recipes-extended/gawk/gawk_5.0.1.bb
@@ -19,8 +19,8 @@
            file://run-ptest \
 "
 
-SRC_URI[md5sum] = "45366249c13aae2bfb00e8e97c3f39b7"
-SRC_URI[sha256sum] = "2d686c9a5b7ba292bc3fa56bc84a1959d721a9d57970a76413156d4b8f1fc67d"
+SRC_URI[md5sum] = "c5441c73cc451764055ee65e9a4292bb"
+SRC_URI[sha256sum] = "625bf3718e25a84dc4486135d5cb5388174682362c70107fd13f21572f5603bb"
 
 inherit autotools gettext texinfo update-alternatives
 
diff --git a/poky/meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch b/poky/meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch
deleted file mode 100644
index e26594d..0000000
--- a/poky/meta/recipes-extended/iptables/iptables/0003-extensions-format-security-fixes-in-libipt_icmp.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 907e429d7548157016cd51aba4adc5d0c7d9f816 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Adam=20Go=C5=82=C4=99biowski?= <adamg@pld-linux.org>
-Date: Wed, 14 Nov 2018 07:35:28 +0100
-Subject: extensions: format-security fixes in libip[6]t_icmp
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-commit 61d6c3834de3 ("xtables: add 'printf' attribute to xlate_add")
-introduced support for gcc feature to check format string against passed
-argument.  This commit adds missing bits to extenstions's libipt_icmp.c
-and libip6t_icmp6.c that were causing build to fail.
-
-Fixes: 61d6c3834de3 ("xtables: add 'printf' attribute to xlate_add")
-Signed-off-by: Adam Gołębiowski <adamg@pld-linux.org>
-Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-
-Upstream-Status: Backport
----
- extensions/libip6t_icmp6.c | 4 ++--
- extensions/libipt_icmp.c   | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/extensions/libip6t_icmp6.c b/extensions/libip6t_icmp6.c
-index 45a71875..cc7bfaeb 100644
---- a/extensions/libip6t_icmp6.c
-+++ b/extensions/libip6t_icmp6.c
-@@ -230,7 +230,7 @@ static unsigned int type_xlate_print(struct xt_xlate *xl, unsigned int icmptype,
- 	type_name = icmp6_type_xlate(icmptype);
- 
- 	if (type_name) {
--		xt_xlate_add(xl, type_name);
-+		xt_xlate_add(xl, "%s", type_name);
- 	} else {
- 		for (i = 0; i < ARRAY_SIZE(icmpv6_codes); ++i)
- 			if (icmpv6_codes[i].type == icmptype &&
-@@ -239,7 +239,7 @@ static unsigned int type_xlate_print(struct xt_xlate *xl, unsigned int icmptype,
- 				break;
- 
- 		if (i != ARRAY_SIZE(icmpv6_codes))
--			xt_xlate_add(xl, icmpv6_codes[i].name);
-+			xt_xlate_add(xl, "%s", icmpv6_codes[i].name);
- 		else
- 			return 0;
- 	}
-diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c
-index 54189976..e76257c5 100644
---- a/extensions/libipt_icmp.c
-+++ b/extensions/libipt_icmp.c
-@@ -236,7 +236,7 @@ static unsigned int type_xlate_print(struct xt_xlate *xl, unsigned int icmptype,
- 			if (icmp_codes[i].type == icmptype &&
- 			    icmp_codes[i].code_min == code_min &&
- 			    icmp_codes[i].code_max == code_max) {
--				xt_xlate_add(xl, icmp_codes[i].name);
-+				xt_xlate_add(xl, "%s", icmp_codes[i].name);
- 				return 1;
- 			}
- 	}
--- 
-cgit v1.2.1
-
diff --git a/poky/meta/recipes-extended/iptables/iptables_1.8.2.bb b/poky/meta/recipes-extended/iptables/iptables_1.8.3.bb
similarity index 84%
rename from poky/meta/recipes-extended/iptables/iptables_1.8.2.bb
rename to poky/meta/recipes-extended/iptables/iptables_1.8.3.bb
index ad2c1a6..6ac3fc6 100644
--- a/poky/meta/recipes-extended/iptables/iptables_1.8.2.bb
+++ b/poky/meta/recipes-extended/iptables/iptables_1.8.3.bb
@@ -10,11 +10,10 @@
 SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
            file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
            file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
-           file://0003-extensions-format-security-fixes-in-libipt_icmp.patch  \
 "
 
-SRC_URI[md5sum] = "944558e88ddcc3b9b0d9550070fa3599"
-SRC_URI[sha256sum] = "a3778b50ed1a3256f9ca975de82c2204e508001fc2471238c8c97f3d1c4c12af"
+SRC_URI[md5sum] = "29de711d15c040c402cf3038c69ff513"
+SRC_URI[sha256sum] = "a23cac034181206b4545f4e7e730e76e08b5f3dd78771ba9645a6756de9cdd80"
 
 inherit autotools pkgconfig
 
@@ -48,6 +47,13 @@
 
 FILES_${PN} += "${datadir}/xtables"
 
+# Include the symlinks as well in respective packages
+FILES_${PN}-module-xt-conntrack += "${libdir}/xtables/libxt_state.so"
+FILES_${PN}-module-xt-ct += "${libdir}/xtables/libxt_NOTRACK.so"
+
+INSANE_SKIP_${PN}-module-xt-conntrack = "dev-so"
+INSANE_SKIP_${PN}-module-xt-ct = "dev-so"
+
 ALLOW_EMPTY_${PN}-modules = "1"
 
 RDEPENDS_${PN} = "${PN}-module-xt-standard"
diff --git a/poky/meta/recipes-extended/libsolv/libsolv/0001-build-use-GNUInstallDirs.patch b/poky/meta/recipes-extended/libsolv/libsolv/0001-build-use-GNUInstallDirs.patch
deleted file mode 100644
index 75ef150..0000000
--- a/poky/meta/recipes-extended/libsolv/libsolv/0001-build-use-GNUInstallDirs.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-Backport a patch from upstream to use GNUInstallDirs instead of
-hand-coded path logic, so we have proper control over where files end up.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From b6c9df4c686975ce5009d09dac706a4e83f02a31 Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-Date: Mon, 2 Jul 2018 12:56:41 +0100
-Subject: [PATCH] build: use GNUInstallDirs
-
-Fixes: #128
-Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
----
- CMakeLists.txt               | 34 +++++++---------------------------
- README                       |  2 +-
- doc/CMakeLists.txt           |  4 ++--
- examples/solv/CMakeLists.txt |  2 +-
- ext/CMakeLists.txt           |  8 ++++----
- libsolv.pc.in                |  4 ++--
- libsolvext.pc.in             |  4 ++--
- src/CMakeLists.txt           |  8 ++++----
- tools/CMakeLists.txt         |  3 +--
- 9 files changed, 24 insertions(+), 45 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1deef57d..7e9ffa9b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,6 +1,6 @@
- PROJECT (libsolv)
- 
--CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
-+CMAKE_MINIMUM_REQUIRED (VERSION 2.8.5)
- 
- OPTION (ENABLE_STATIC "Build a static version of the libraries?" OFF)
- OPTION (DISABLE_SHARED "Do not build a shared version of the libraries?" OFF)
-@@ -38,34 +38,14 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF)
- OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF)
- OPTION (WITH_LIBXML2  "Build with libxml2 instead of libexpat?" OFF)
- 
--# Library
--IF (DEFINED LIB)
--  SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}")
--ELSE (DEFINED  LIB)
--  IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
--    SET (LIB_SUFFIX "64")
--  ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
--  SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
--ENDIF (DEFINED  LIB)
--MESSAGE (STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}")
--# Library
--IF (DEFINED INCLUDE)
--  SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE}")
--else (DEFINED INCLUDE)
--  SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
--ENDIF (DEFINED  INCLUDE)
--MESSAGE (STATUS "Header files will be installed in ${INCLUDE_INSTALL_DIR}")
--SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
--IF (NOT MAN_INSTALL_DIR)
--SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
--IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man"  AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man")
--  SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man")
--ENDIF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man"  AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man")
--ENDIF (NOT MAN_INSTALL_DIR)
--MESSAGE(STATUS "Man pages will be installed in ${MAN_INSTALL_DIR}")
-+include (GNUInstallDirs)
-+message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}")
-+message (STATUS "Header files will be installed in ${CMAKE_INSTALL_FULL_INCLUDEDIR}")
-+message (STATUS "Binaries will be installed in ${CMAKE_INSTALL_FULL_BINDIR}")
-+message (STATUS "Man pages will be installed in ${CMAKE_INSTALL_FULL_MANDIR}")
- 
- IF (NOT PKGCONFIG_INSTALL_DIR)
--  SET (PKGCONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/pkgconfig)
-+  SET (PKGCONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
- ENDIF (NOT PKGCONFIG_INSTALL_DIR)
- ####################################################################
- # CONFIGURATION                                                    #
-diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
-index 66011b48..ed38274e 100644
---- a/doc/CMakeLists.txt
-+++ b/doc/CMakeLists.txt
-@@ -48,8 +48,8 @@ STRING(REGEX REPLACE "([^;]+)" "gen/\\1" libsolv_MANPAGES3 "${libsolv_MANPAGES3}
- 
- INSTALL(FILES
-     ${libsolv_MANPAGES3}
--    DESTINATION "${MAN_INSTALL_DIR}/man3")
-+    DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
- 
- INSTALL(FILES
-     ${libsolv_MANPAGES1}
--    DESTINATION "${MAN_INSTALL_DIR}/man1")
-+    DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
-diff --git a/examples/solv/CMakeLists.txt b/examples/solv/CMakeLists.txt
-index 41f45f74..0f3bd477 100644
---- a/examples/solv/CMakeLists.txt
-+++ b/examples/solv/CMakeLists.txt
-@@ -25,5 +25,5 @@ TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${SYSTEM_LIBRARIES})
- 
- INSTALL(TARGETS
-     solv
--    DESTINATION ${BIN_INSTALL_DIR})
-+    DESTINATION ${CMAKE_INSTALL_BINDIR})
- 
-diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
-index edc2b9f9..6dd28b1a 100644
---- a/ext/CMakeLists.txt
-+++ b/ext/CMakeLists.txt
-@@ -145,14 +145,14 @@ ENDIF (DISABLE_SHARED)
- 
- SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
- SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
--SET_TARGET_PROPERTIES(libsolvext PROPERTIES INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
-+SET_TARGET_PROPERTIES(libsolvext PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR})
- 
--INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv")
--INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} RUNTIME DESTINATION bin)
-+INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
-+INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
- 
- IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
- ADD_LIBRARY (libsolvext_static STATIC ${libsolvext_SRCS})
- SET_TARGET_PROPERTIES(libsolvext_static PROPERTIES OUTPUT_NAME "solvext")
- SET_TARGET_PROPERTIES(libsolvext_static PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
--INSTALL (TARGETS libsolvext_static LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
-+INSTALL (TARGETS libsolvext_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
- ENDIF (ENABLE_STATIC AND NOT DISABLE_SHARED)
-diff --git a/libsolv.pc.in b/libsolv.pc.in
-index 40a86230..766146c5 100644
---- a/libsolv.pc.in
-+++ b/libsolv.pc.in
-@@ -1,5 +1,5 @@
--libdir=@LIB_INSTALL_DIR@
--includedir=@INCLUDE_INSTALL_DIR@
-+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
-+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
- 
- Name: libsolv
- Description: Library for solving packages
-diff --git a/libsolvext.pc.in b/libsolvext.pc.in
-index d48b6fab..d0078461 100644
---- a/libsolvext.pc.in
-+++ b/libsolvext.pc.in
-@@ -1,5 +1,5 @@
--libdir=@LIB_INSTALL_DIR@
--includedir=@INCLUDE_INSTALL_DIR@
-+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
-+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
- 
- Name: libsolvext
- Description: Library for reading repositories
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 2e32968e..03ea9119 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -42,14 +42,14 @@ ENDIF (DISABLE_SHARED)
- 
- SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv")
- SET_TARGET_PROPERTIES(libsolv PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
--SET_TARGET_PROPERTIES(libsolv PROPERTIES INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
-+SET_TARGET_PROPERTIES(libsolv PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR})
- 
--INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv")
--INSTALL (TARGETS libsolv LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} RUNTIME DESTINATION bin)
-+INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
-+INSTALL (TARGETS libsolv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
- 
- IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
- ADD_LIBRARY (libsolv_static STATIC ${libsolv_SRCS})
- SET_TARGET_PROPERTIES(libsolv_static PROPERTIES OUTPUT_NAME "solv")
- SET_TARGET_PROPERTIES(libsolv_static PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})
--INSTALL (TARGETS libsolv_static LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
-+INSTALL (TARGETS libsolv_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
- ENDIF (ENABLE_STATIC AND NOT DISABLE_SHARED)
-diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
-index 802dc500..0d677f69 100644
---- a/tools/CMakeLists.txt
-+++ b/tools/CMakeLists.txt
-@@ -110,5 +110,4 @@ TARGET_LINK_LIBRARIES (testsolv libsolvext libsolv ${SYSTEM_LIBRARIES})
- ADD_EXECUTABLE (repo2solv repo2solv.c )
- TARGET_LINK_LIBRARIES (repo2solv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES})
- 
--INSTALL (TARGETS ${tools_list} DESTINATION ${BIN_INSTALL_DIR})
--
-+INSTALL (TARGETS ${tools_list} DESTINATION ${CMAKE_INSTALL_BINDIR})
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-extended/libsolv/libsolv_0.7.4.bb b/poky/meta/recipes-extended/libsolv/libsolv_0.7.5.bb
similarity index 87%
rename from poky/meta/recipes-extended/libsolv/libsolv_0.7.4.bb
rename to poky/meta/recipes-extended/libsolv/libsolv_0.7.5.bb
index b8653ad..80ce76b 100644
--- a/poky/meta/recipes-extended/libsolv/libsolv_0.7.4.bb
+++ b/poky/meta/recipes-extended/libsolv/libsolv_0.7.5.bb
@@ -8,10 +8,9 @@
 DEPENDS = "expat zlib"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
-           file://0001-build-use-GNUInstallDirs.patch \
 "
 
-SRCREV = "51fc3b1214aa9677e972712fa1ce6916e438751f"
+SRCREV = "2cab7ea00d08390374b25b11d969f3740c4660f4"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
similarity index 90%
rename from poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
rename to poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
index 3c66c94..b5c25c5 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0001-build-Add-option-to-select-libc-implementation.patch
@@ -1,7 +1,7 @@
-From 53acddddf1b324e06af886ee4639b774e5c8c8bc Mon Sep 17 00:00:00 2001
+From ec282980e6eee96f5b74aba464141f86049263e6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 7 Jan 2016 18:19:03 +0000
-Subject: [PATCH 04/32] build: Add option to select libc implementation
+Subject: [PATCH] build: Add option to select libc implementation
 
 There are more than glibc for C library implementation available on
 linux now a days, uclibc cloaked like glibc but musl e.g. is very
@@ -9,8 +9,9 @@
 
 Disable tests specifically not building _yet_ on musl based systems
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  Makefile                                    | 5 +++++
  testcases/kernel/Makefile                   | 5 ++++-
@@ -23,10 +24,10 @@
  8 files changed, 35 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 297f8e7..906b280 100644
+index 768ca46..e9d679a 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -49,6 +49,11 @@ SKIP_IDCHECK		?= 0
+@@ -41,6 +41,11 @@ vpath %.mk		$(top_srcdir)/mk:$(top_srcdir)/mk/include
  UCLINUX			?= 0
  export UCLINUX
  
@@ -39,7 +40,7 @@
  # COMMON_TARGETS:	Targets which exist in all, clean, and install.
  # INSTALL_TARGETS:	Targets which exist in clean and install (contains
 diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
-index 50a12fa..4f1987f 100644
+index 39d79c7..24a57d9 100644
 --- a/testcases/kernel/Makefile
 +++ b/testcases/kernel/Makefile
 @@ -49,12 +49,15 @@ SUBDIRS			+= connectors \
@@ -60,7 +61,7 @@
  SUBDIRS			+= power_management
  endif
 diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
-index 6245ed0..aa4eb7f 100644
+index 6a57d79..74bb933 100644
 --- a/testcases/kernel/sched/Makefile
 +++ b/testcases/kernel/sched/Makefile
 @@ -23,5 +23,7 @@
@@ -73,7 +74,7 @@
 +endif
  include $(top_srcdir)/include/mk/generic_trunk_target.mk
 diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
-index 8acb395..b749126 100644
+index 45a00cf..d1becd0 100644
 --- a/testcases/kernel/syscalls/Makefile
 +++ b/testcases/kernel/syscalls/Makefile
 @@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
@@ -89,7 +90,7 @@
  ifeq ($(UCLIBC),1)
  FILTER_OUT_DIRS	+= profil
 diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
-index 8bc78c2..c36cf50 100644
+index 8c55a6b..f7cda62 100644
 --- a/testcases/network/nfsv4/acl/Makefile
 +++ b/testcases/network/nfsv4/acl/Makefile
 @@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
@@ -102,7 +103,7 @@
 +
  include $(top_srcdir)/include/mk/generic_leaf_target.mk
 diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
-index 3160813..9bdf5d0 100644
+index 66e9d56..ea8eb8a 100644
 --- a/testcases/network/rpc/basic_tests/Makefile
 +++ b/testcases/network/rpc/basic_tests/Makefile
 @@ -23,4 +23,9 @@
@@ -116,7 +117,7 @@
 +
  include $(top_srcdir)/include/mk/generic_trunk_target.mk
 diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
-index 7a7a57a..5808866 100644
+index 68616a7..748754b 100644
 --- a/testcases/realtime/func/pi-tests/Makefile
 +++ b/testcases/realtime/func/pi-tests/Makefile
 @@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
@@ -130,7 +131,7 @@
  
  include $(top_srcdir)/include/mk/generic_leaf_target.mk
 diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
-index 5edc3b4..aa5987a 100644
+index 1881f75..266e0b8 100644
 --- a/testcases/realtime/stress/pi-tests/Makefile
 +++ b/testcases/realtime/stress/pi-tests/Makefile
 @@ -24,4 +24,9 @@ top_srcdir		?= ../../../..
@@ -144,5 +145,5 @@
 +
  include $(top_srcdir)/include/mk/generic_leaf_target.mk
 -- 
-2.7.0
+2.7.4
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch b/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
deleted file mode 100644
index 39623c3..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From db57ddc1497e72947da2b14f471ab521478ef99d Mon Sep 17 00:00:00 2001
-From: Tommi Rantala <tommi.t.rantala@nokia.com>
-Date: Thu, 31 Jan 2019 19:49:00 +0200
-Subject: [PATCH] syscalls/setrlimit03.c: read /proc/sys/fs/nr_open for
- RLIMIT_NOFILE limit
-
-Since kernel v2.6.25 RLIMIT_NOFILE limit is no longer hardcoded to
-NR_OPEN, but can be set via /proc/sys/fs/nr_open, see kernel commit
-9cfe015aa424b3c003baba3841a60dd9b5ad319b ("get rid of NR_OPEN and
-introduce a sysctl_nr_open").
-
-nr_open default value is 1024*1024, so setrlimit03 has been passing fine
-on new kernels, only "unexpectedly succeeding" if nr_open is set to some
-larger value.
-
-Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
-Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
-Upstream-Status: Backport [db57ddc1497e ("syscalls/setrlimit03.c: read /proc/sys/fs/nr_open for RLIMIT_NOFILE limit")]
-
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- testcases/kernel/syscalls/setrlimit/setrlimit03.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit03.c b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
-index 29b52aa..12455fe 100644
---- a/testcases/kernel/syscalls/setrlimit/setrlimit03.c
-+++ b/testcases/kernel/syscalls/setrlimit/setrlimit03.c
-@@ -35,7 +35,10 @@
- # define NR_OPEN (1024*1024)
- #endif
- 
-+#define NR_OPEN_PATH "/proc/sys/fs/nr_open"
-+
- static struct rlimit rlim1, rlim2;
-+static unsigned int nr_open = NR_OPEN;
- 
- static struct tcase {
- 	struct rlimit *rlimt;
-@@ -51,7 +54,10 @@ static void verify_setrlimit(unsigned int n)
- 
- 	TEST(setrlimit(RLIMIT_NOFILE, tc->rlimt));
- 	if (TST_RET != -1) {
--		tst_res(TFAIL, "call succeeded unexpectedly");
-+		tst_res(TFAIL, "call succeeded unexpectedly "
-+			"(nr_open=%u rlim_cur=%lu rlim_max=%lu)", nr_open,
-+			(unsigned long)(tc->rlimt->rlim_cur),
-+			(unsigned long)(tc->rlimt->rlim_max));
- 		return;
- 	}
- 
-@@ -65,10 +71,13 @@ static void verify_setrlimit(unsigned int n)
- 
- static void setup(void)
- {
-+	if (!access(NR_OPEN_PATH, F_OK))
-+		SAFE_FILE_SCANF(NR_OPEN_PATH, "%u", &nr_open);
-+
- 	SAFE_GETRLIMIT(RLIMIT_NOFILE, &rlim1);
- 	rlim2.rlim_max = rlim1.rlim_cur;
- 	rlim2.rlim_cur = rlim1.rlim_max + 1;
--	rlim1.rlim_max = NR_OPEN + 1;
-+	rlim1.rlim_max = nr_open + 1;
- }
- 
- static struct tst_test test = {
--- 
-2.7.4
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch b/poky/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
similarity index 86%
rename from poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
rename to poky/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
index b9390e2..eff9ed0 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
@@ -1,20 +1,21 @@
-From 6e3058521b50d91d4b0569c4d491c5af5ff798b2 Mon Sep 17 00:00:00 2001
+From 81e5bd5442337a4a648a0dbbff47eaac0d351287 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 7 Jan 2016 18:22:38 +0000
-Subject: [PATCH 05/32] kernel/controllers: Link with libfts explicitly on musl
+Subject: [PATCH] kernel/controllers: Link with libfts explicitly on musl
 
 musl does not implement fts like glibc and therefore it depends on
 external implementation for all fts APIs
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  testcases/kernel/controllers/Makefile.inc        | 3 +++
  testcases/kernel/controllers/cpuset/Makefile.inc | 3 +++
  2 files changed, 6 insertions(+)
 
 diff --git a/testcases/kernel/controllers/Makefile.inc b/testcases/kernel/controllers/Makefile.inc
-index b106283..ef5fc0c 100644
+index 4ca0b5a..1d85e4d 100644
 --- a/testcases/kernel/controllers/Makefile.inc
 +++ b/testcases/kernel/controllers/Makefile.inc
 @@ -36,6 +36,9 @@ MAKE_DEPS		:= $(LIB)
@@ -28,7 +29,7 @@
  INSTALL_TARGETS		?= *.sh
  
 diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
-index 9e002f4..e0fcb9c 100644
+index db6a843..86dd2a8 100644
 --- a/testcases/kernel/controllers/cpuset/Makefile.inc
 +++ b/testcases/kernel/controllers/cpuset/Makefile.inc
 @@ -42,6 +42,9 @@ MAKE_DEPS		:= $(LIBCONTROLLERS) $(LIBCPUSET)
@@ -42,5 +43,5 @@
  INSTALL_TARGETS		?= *.sh
  
 -- 
-2.7.0
+2.7.4
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
new file mode 100644
index 0000000..c0f69ec
--- /dev/null
+++ b/poky/meta/recipes-extended/ltp/ltp/0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
@@ -0,0 +1,58 @@
+From 29ce9fdab3bd34e69d73b5b890795559c06553f7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:40:08 +0000
+Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it
+
+__GLIBC_PREREQ is specific to glibc so it should be checked if it is
+defined or not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/syscalls/accept4/accept4_01.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
+index dd289cf..76aa969 100644
+--- a/testcases/kernel/syscalls/accept4/accept4_01.c
++++ b/testcases/kernel/syscalls/accept4/accept4_01.c
+@@ -38,6 +38,7 @@
+ static struct sockaddr_in conn_addr;
+ static int listening_fd;
+ 
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 10))
+ static int
+ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+@@ -56,6 +57,7 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
+ #endif
+ }
+ #endif
++#endif
+ 
+ static int create_listening_socket(void)
+ {
+@@ -115,6 +117,7 @@ static void verify_accept4(unsigned int nr)
+ 	SAFE_CONNECT(connfd, (struct sockaddr *)&conn_addr, sizeof(conn_addr));
+ 	addrlen = sizeof(claddr);
+ 
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if !(__GLIBC_PREREQ(2, 10))
+ 	TEST(accept4_01(listening_fd, (struct sockaddr *)&claddr, &addrlen,
+ 				tcase->cloexec | tcase->nonblock));
+@@ -122,6 +125,10 @@ static void verify_accept4(unsigned int nr)
+ 	TEST(accept4(listening_fd, (struct sockaddr *)&claddr, &addrlen,
+ 				tcase->cloexec | tcase->nonblock));
+ #endif
++#else
++	TEST(accept4(listening_fd, (struct sockaddr *)&claddr, &addrlen,
++				tcase->cloexec | tcase->nonblock));
++#endif
+ 	if (TST_RET == -1) {
+ 		if (TST_ERR == ENOSYS)
+ 			tst_brk(TCONF, "syscall __NR_accept4 not supported");
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch b/poky/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch
similarity index 87%
rename from poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
rename to poky/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch
index a79763d..5622a64 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0004-guard-mallocopt-with-__GLIBC__.patch
@@ -1,12 +1,13 @@
-From f42b060e80c9f40627c712d4d56d45221bd7d9fa Mon Sep 17 00:00:00 2001
+From d0fc9ca5d3366f9b8907e463222403cd2327be10 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 8 Jan 2016 06:51:20 +0000
-Subject: [PATCH 18/32] guard mallocopt() with __GLIBC__
+Subject: [PATCH] guard mallocopt() with __GLIBC__
 
 mallocopt is not available on non glibc implementations
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
@@ -29,5 +30,5 @@
  		fprintf(stderr, "Chunk size %u smaller than record size %u\n",
  			chunk_size, record_size);
 -- 
-2.7.0
+2.7.4
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch b/poky/meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch
similarity index 87%
rename from poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
rename to poky/meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch
index 7060a64b..d1f7b07 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0005-getdents-define-getdents-getdents64-only-for-glibc.patch
@@ -1,20 +1,20 @@
-From aa3568e6ac28f377e75ce16b11e3c7738a373e53 Mon Sep 17 00:00:00 2001
+From b996b2480fe3a800ffbdc4a0fdc5e8775c575449 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 8 Jan 2016 06:57:04 +0000
-Subject: [PATCH 20/32] getdents: define getdents/getdents64 only for glibc
+Subject: [PATCH] getdents: define getdents/getdents64 only for glibc
 
 getdents/getdents64 are implemented in musl and when we define static
 functions with same name, it errors out.
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
 Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
  testcases/kernel/syscalls/getdents/getdents.h | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/testcases/kernel/syscalls/getdents/getdents.h b/testcases/kernel/syscalls/getdents/getdents.h
-index abea655..db63d89 100644
+index 702b0bd..860b22e 100644
 --- a/testcases/kernel/syscalls/getdents/getdents.h
 +++ b/testcases/kernel/syscalls/getdents/getdents.h
 @@ -34,12 +34,13 @@ struct linux_dirent {
@@ -46,5 +46,5 @@
 +#endif
  #endif /* GETDENTS_H */
 -- 
-2.7.0
+2.7.4
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch b/poky/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch
new file mode 100644
index 0000000..804edfa
--- /dev/null
+++ b/poky/meta/recipes-extended/ltp/ltp/0006-rt_tgsigqueueinfo-disable-test-on-musl.patch
@@ -0,0 +1,35 @@
+From 60054686e2c1a4bedf1d507af97ebbb7ff491e77 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 18 Jul 2019 15:23:15 +0800
+Subject: [PATCH] rt_tgsigqueueinfo: disable test on musl
+
+Fix build error with musl:
+rt_tgsigqueueinfo01.c: In function 'sigusr1_handler':
+rt_tgsigqueueinfo01.c:42:22: error: 'siginfo_t' {aka 'struct <anonymous>'} has no member named '_sifields'; did you mean '__si_fields'?
+   42 |  sigval_rcv = uinfo->_sifields._rt.SI_SIGVAL.sival_ptr;
+      |                      ^~~~~~~~~
+      |                      __si_fields
+
+Upstream-Status: Pending
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/syscalls/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
+index d1becd0..1f3ff34 100644
+--- a/testcases/kernel/syscalls/Makefile
++++ b/testcases/kernel/syscalls/Makefile
+@@ -31,7 +31,7 @@ endif
+ ifeq ($(LIBC),musl)
+ FILTER_OUT_DIRS	+= confstr fmtmsg getcontext ioctl mallopt profil \
+ 		   rt_sigsuspend setdomainname sethostname sigsuspend \
+-		   ustat
++		   ustat rt_tgsigqueueinfo
+ endif
+ 
+ ifeq ($(UCLIBC),1)
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch b/poky/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
similarity index 86%
rename from poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
rename to poky/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
index 665da3b..0e72645 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
@@ -1,22 +1,22 @@
-From f7c602b639db0d118e07d3fa7b6deead0be0c72b Mon Sep 17 00:00:00 2001
+From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001
 From: Dengke Du <dengke.du@windriver.com>
 Date: Wed, 8 Feb 2017 16:17:17 +0800
-Subject: [PATCH 3/5] Fix test_proc_kill hanging
+Subject: [PATCH] Fix test_proc_kill hanging
 
 Sometimes the signal is delivered to memcg_process before the framework took
 into consideration its pid entered in the tasks. Fixed by delaying the signal
 send command.
 
+Upstream-Status: Pending
+
 Signed-off-by: George Nita <george.nita@enea.com>
 Signed-off-by: Dengke Du <dengke.du@windriver.com>
-
-Upstream-Status: Pending
 ---
  testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
-index b785fe3..2918cc5 100755
+index aadaae4..deea5d6 100755
 --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
 +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
 @@ -291,6 +291,7 @@ test_proc_kill()
diff --git a/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch b/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
deleted file mode 100644
index 6e6dbf3..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d1a27570457fb6e1d6bafe81bfa0f3507b137e32 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 9 Feb 2017 18:20:58 +0800
-Subject: [PATCH] fix __WORDSIZE undeclared when building with musl
-
-fix __WORDSIZE undeclared when building with musl.
-
-Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/177]
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- include/old/test.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/include/old/test.h b/include/old/test.h
-index b36764d83..cc6f1b551 100644
---- a/include/old/test.h
-+++ b/include/old/test.h
-@@ -17,6 +17,9 @@
- #include <string.h>
- #include <stdlib.h>
- #include <stdint.h>
-+#ifndef __GLIBC__
-+#include <bits/reg.h>
-+#endif
- 
- #include "usctest.h"
- 
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
deleted file mode 100644
index 7311ee2..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From fc2b47ad979a87bfbd11aeea3f67c26e7fb39e30 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 7 Jan 2016 19:40:08 +0000
-Subject: [PATCH] Check if __GLIBC_PREREQ is defined before using it
-
-__GLIBC_PREREQ is specific to glibc so it should be checked if it is
-defined or not.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../kernel/syscalls/accept4/accept4_01.c      |  9 ++++++-
- .../sched_getaffinity/sched_getaffinity01.c   | 26 +++++++++++++++++++
- 2 files changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
-index dec4ef93b..c5d74b07f 100644
---- a/testcases/kernel/syscalls/accept4/accept4_01.c
-+++ b/testcases/kernel/syscalls/accept4/accept4_01.c
-@@ -64,6 +64,7 @@ static void cleanup(void)
- 	tst_rmdir();
- }
- 
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if !(__GLIBC_PREREQ(2, 10))
- static int
- accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
-@@ -82,7 +83,6 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
- 	}
- 	tst_resm(TINFO, "\n");
- #endif
--
- #if USE_SOCKETCALL
- 	long args[6];
- 
-@@ -97,6 +97,7 @@ accept4_01(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags)
- #endif
- }
- #endif
-+#endif
- 
- static void
- do_test(int lfd, struct sockaddr_in *conn_addr,
-@@ -119,9 +120,15 @@ do_test(int lfd, struct sockaddr_in *conn_addr,
- 		die("Connect Error");
- 
- 	addrlen = sizeof(struct sockaddr_in);
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if !(__GLIBC_PREREQ(2, 10))
- 	acceptfd = accept4_01(lfd, (struct sockaddr *)&claddr, &addrlen,
- 			      closeonexec_flag | nonblock_flag);
-+
-+#else
-+	acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
-+			   closeonexec_flag | nonblock_flag);
-+#endif
- #else
- 	acceptfd = accept4(lfd, (struct sockaddr *)&claddr, &addrlen,
- 			   closeonexec_flag | nonblock_flag);
-diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
-index 02f04b909..d906d7e09 100644
---- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
-+++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
-@@ -67,9 +67,11 @@ do { \
- 	tst_resm((TEST_RETURN == -1 ? TPASS : TFAIL) | TTERRNO, #t); \
- } while (0)
- 
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if !(__GLIBC_PREREQ(2, 7))
- #define CPU_FREE(ptr)	free(ptr)
- #endif
-+#endif
- 
- int main(int ac, char **av)
- {
-@@ -96,17 +98,26 @@ static void do_test(void)
- 	pid_t unused_pid;
- 	unsigned len;
- 
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- realloc:
- 	mask = CPU_ALLOC(nrcpus);
-+#else
-+	mask = malloc(sizeof(cpu_set_t));
-+#endif
- #else
- 	mask = malloc(sizeof(cpu_set_t));
- #endif
- 	if (mask == NULL)
- 		tst_brkm(TFAIL | TTERRNO, cleanup, "fail to get enough memory");
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- 	len = CPU_ALLOC_SIZE(nrcpus);
- 	CPU_ZERO_S(len, mask);
-+#else
-+	len = sizeof(cpu_set_t);
-+	CPU_ZERO(mask);
-+#endif
- #else
- 	len = sizeof(cpu_set_t);
- 	CPU_ZERO(mask);
-@@ -115,11 +126,18 @@ realloc:
- 	TEST(sched_getaffinity(0, len, mask));
- 	if (TEST_RETURN == -1) {
- 		CPU_FREE(mask);
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- 		if (errno == EINVAL && nrcpus < (1024 << 8)) {
- 			nrcpus = nrcpus << 2;
- 			goto realloc;
- 		}
-+#else
-+		if (errno == EINVAL)
-+			tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a "
-+				 "newer glibc(>= 2.7)");
-+		else
-+#endif
- #else
- 		if (errno == EINVAL)
- 			tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a "
-@@ -132,8 +150,12 @@ realloc:
- 		tst_resm(TINFO, "cpusetsize is %d", len);
- 		tst_resm(TINFO, "mask.__bits[0] = %lu ", mask->__bits[0]);
- 		for (i = 0; i < num; i++) {
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- 			TEST(CPU_ISSET_S(i, len, mask));
-+#else
-+			TEST(CPU_ISSET(i, mask));
-+#endif
- #else
- 			TEST(CPU_ISSET(i, mask));
- #endif
-@@ -144,8 +166,12 @@ realloc:
- 		}
- 	}
- 
-+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 7)
- 	CPU_ZERO_S(len, mask);
-+#else
-+	CPU_ZERO(mask);
-+#endif
- #else
- 	CPU_ZERO(mask);
- #endif
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch b/poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
similarity index 89%
rename from poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
rename to poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
index e826d48..b46325e 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
@@ -1,8 +1,8 @@
-From 672a56be14426eae44864673c6c2afca0ab89d46 Mon Sep 17 00:00:00 2001
+From aa7a9185a037ad59012bd46713ac340458e95209 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
 Date: Fri, 13 May 2016 11:11:28 -0500
-Subject: [PATCH] testcases/network/nfsv4/acl/acl1.c: Security fix on string
- printf
+Subject: [PATCH] testcases/network/nfsv4/acl/acl1.c: Security fix on
+ string printf
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -16,15 +16,15 @@
 
 [YOCTO #9548]
 
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-
 Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
 ---
  testcases/network/nfsv4/acl/acl1.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
-index b8b67b4..7c7c506 100644
+index bdf0180..898b7ca 100644
 --- a/testcases/network/nfsv4/acl/acl1.c
 +++ b/testcases/network/nfsv4/acl/acl1.c
 @@ -303,7 +303,7 @@ void test_acl_default(char *dir, acl_t acl)
@@ -37,5 +37,5 @@
  	system(cmd);
  	acl2 = acl_get_file(path, ACL_TYPE_ACCESS);
 -- 
-2.1.4
+2.7.4
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch b/poky/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch
deleted file mode 100644
index dd7d283..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From bf5dd2932200e0199a38f3028d3bef2253f32e38 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Thu, 9 Feb 2017 17:17:37 +0800
-Subject: [PATCH] fix redefinition of 'struct msgbuf' error building with musl
-
-When building with musl the file "sys/msg.h" already contain 'struct msgbuf'
-
-Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/177]
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
-index a757c0d18..e023114d2 100644
---- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
-+++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv08.c
-@@ -47,11 +47,13 @@ const char *TCID = "msgrcv08";
- const int TST_TOTAL = 1;
- 
- #if __WORDSIZE == 32
--
-+#ifdef __GLIBC__
- struct msgbuf {
- 	long mtype;     /* message type, must be > 0 */
- 	char mtext[16]; /* message data */
- };
-+#else
-+#endif
- 
- static void msr(int msqid)
- {
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch b/poky/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
similarity index 95%
rename from poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
rename to poky/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
index 8473605..d32ac1d 100644
--- a/poky/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
+++ b/poky/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
@@ -1,4 +1,4 @@
-From 85c972f730e8efe891a06ea3a2dfb5cbbdfbfbf4 Mon Sep 17 00:00:00 2001
+From a8715a1446305ffd76406f63c7f160c13a5b2e72 Mon Sep 17 00:00:00 2001
 From: "Hongzhi.Song" <hongzhi.song@windriver.com>
 Date: Wed, 10 Oct 2018 22:07:05 -0400
 Subject: [PATCH] open_posix_testsuite/mmap24-2: Relax condition a bit
@@ -23,7 +23,7 @@
  1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
-index de51d43..810e5c8 100644
+index 9cf83d9..55090a6 100644
 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
 +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c
 @@ -7,7 +7,7 @@
@@ -64,5 +64,5 @@
  	return PTS_FAIL;
  }
 -- 
-2.8.1
+2.7.4
 
diff --git a/poky/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch b/poky/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch
new file mode 100644
index 0000000..8704e5f
--- /dev/null
+++ b/poky/meta/recipes-extended/ltp/ltp/0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch
@@ -0,0 +1,82 @@
+From 794933b38354a2612cf2c471f11798b306f35315 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Mon, 20 May 2019 20:47:20 +0200
+Subject: [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test
+
+Test fails on SHM_STAT testcase:
+   shmctl01    5  TFAIL  :  shmctl01.c:173: shmctl01 call failed
+                            errno = 22 : Invalid argument
+   shmctl(0, SHM_STAT, 0x601060)           = -EINVAL
+
+since following commit:
+   commit 99db46ea292780cd978d56932d9445b1e8bdafe8
+   Author: Manfred Spraul <manfred@colorfullife.com>
+   Date:   Tue May 14 15:46:36 2019 -0700
+     ipc: do cyclic id allocation for the ipc object.
+
+Don't rely on index 0 being always available, but instead
+use (maximum) index returned by SHM_INFO.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Reviewed-by: Petr Vorel <pvorel@suse.cz>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/db0a43d9388be2c347a8306751bbe6bec086d062]
+
+Signed-off-by: Hongzhi Song <hongzhi.song@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+index 1b46977..52bf23a 100644
+--- a/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
++++ b/testcases/kernel/syscalls/ipc/shmctl/shmctl01.c
+@@ -79,6 +79,7 @@ static void func_info(int ret);
+ 
+ /* Check routine for SHM_STAT */
+ static void func_sstat(int ret);
++static void func_sstat_setup(void);
+ 
+ /* Check routine for SHM_LOCK */
+ static void func_lock(int ret);
+@@ -110,7 +111,7 @@ static struct test_case_t {
+ #endif
+ 	{&shm_id_1, IPC_SET, &buf, func_set, set_setup},
+ 	{&shm_id_1, IPC_INFO, (struct shmid_ds *) &info, func_info, NULL},
+-	{&shm_index, SHM_STAT, &buf, func_sstat, NULL},
++	{&shm_index, SHM_STAT, &buf, func_sstat, func_sstat_setup},
+ 	{&shm_id_1, SHM_LOCK, NULL, func_lock, NULL},
+ 	{&shm_id_1, SHM_UNLOCK, NULL, func_unlock, NULL},
+ 	{&shm_id_1, IPC_RMID, NULL, func_rmid, NULL},
+@@ -407,9 +408,23 @@ static void func_info(int ret)
+ static void func_sstat(int ret)
+ {
+ 	if (ret >= 0)
+-		tst_resm(TPASS, "get correct shared memory id");
++		tst_resm(TPASS, "get correct shared memory id for index: %d",
++			shm_index);
+ 	else
+-		tst_resm(TFAIL, "shared memory id is incorrect");
++		tst_resm(TFAIL, "shared memory id is incorrect, index: %d",
++			shm_index);
++}
++
++static void func_sstat_setup(void)
++{
++	struct shm_info tmp;
++	int ret;
++
++	ret = shmctl(shm_id_1, SHM_INFO, (void *)&tmp);
++	if (ret < 0)
++		tst_resm(TFAIL|TERRNO, "shmctl(SHM_INFO)");
++	else
++		shm_index = ret;
+ }
+ 
+ static void func_lock(int ret)
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch b/poky/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch
new file mode 100644
index 0000000..9cd188f
--- /dev/null
+++ b/poky/meta/recipes-extended/ltp/ltp/0011-direct_io-diotest4-drop-MAP_FIXED.patch
@@ -0,0 +1,56 @@
+From f210d7e19b721041f31b7f258a169f89dc850303 Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Thu, 4 Jul 2019 16:45:23 +0200
+Subject: [PATCH] direct_io/diotest4: drop MAP_FIXED
+
+Hongzhi reports that this test is failing on mips64 with 5.1+:
+  diotest4 10 TBROK : diotest4.c:368: can't mmap file: Invalid argument
+  diotest4 11 TBROK : diotest4.c:368: Remaining cases broken
+I could reproduce it on emulated 5kc-malta, running 5.2.0-rc7.
+
+Test is trying to map into area immediately following heap as MAP_SHARED,
+but it used wrong alignment (fixed by 'lapi/mmap.h: include config.h').
+
+Usage of MAP_FIXED seems unnecessary, so drop that too and let the kernel
+pick an address.
+
+Reported-by: Hongzhi.Song <hongzhi.song@windriver.com>
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Acked-by: Cyril Hrubis <chrubis@suse.cz>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/f5444eeeabf252b8884b9465d277b6af853819e3]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/kernel/io/direct_io/diotest4.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
+index e4616e4..bf200cd 100644
+--- a/testcases/kernel/io/direct_io/diotest4.c
++++ b/testcases/kernel/io/direct_io/diotest4.c
+@@ -352,18 +352,14 @@ int main(int argc, char *argv[])
+ 	total++;
+ 
+ 	/* Test-10: read, write to a mmaped file */
+-	shm_base = (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1));
+-	if (shm_base == NULL) {
+-		tst_brkm(TBROK, cleanup, "sbrk failed: %s", strerror(errno));
+-	}
+ 	offset = 4096;
+ 	count = bufsize;
+ 	if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
+ 		tst_brkm(TBROK, cleanup, "can't open %s: %s",
+ 			 filename, strerror(errno));
+ 	}
+-	shm_base = mmap(shm_base, 0x100000, PROT_READ | PROT_WRITE,
+-			MAP_SHARED | MAP_FIXED, fd, 0);
++	shm_base = mmap(0, 0x100000, PROT_READ | PROT_WRITE,
++			MAP_SHARED, fd, 0);
+ 	if (shm_base == (caddr_t) - 1) {
+ 		tst_brkm(TBROK, cleanup, "can't mmap file: %s",
+ 			 strerror(errno));
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch b/poky/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
new file mode 100644
index 0000000..aecbc80
--- /dev/null
+++ b/poky/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
@@ -0,0 +1,64 @@
+From 4ac747c1f7ff8e2ec2567d6672822e95a9b56e55 Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" <hongzhi.song@windriver.com>
+Date: Mon, 15 Jul 2019 03:39:06 -0400
+Subject: [PATCH] getrlimit03: adjust a bit of code to compatiable with mips32
+
+Error info:
+getrlimit03.c:104: FAIL: __NR_prlimit64(0) had rlim_cur =
+ffffffffffffffff but __NR_getrlimit(0) had rlim_cur = 7fffffff
+
+According to kernel code: [arch/mips/include/uapi/asm/resource.h]
+RLIM_INFINITY is set to 0x7fffffffUL instead of ULONG_MAX on mips32.
+
+ /*
+ * SuS says limits have to be unsigned.
+ * Which makes a ton more sense anyway,
+ * but we keep the old value on MIPS32,
+ * for compatibility:
+ */
+ #ifndef __mips64
+ # define RLIM_INFINITY      0x7fffffffUL
+ #endif
+
+Adding conditional statement about mips to fix this.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+
+Upstream-Status: Backport
+[https://github.com/linux-test-project/ltp/commit/7a3bca63cd7f059d490b6274f0fdf3247be93fde]
+
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+---
+ testcases/kernel/syscalls/getrlimit/getrlimit03.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit03.c b/testcases/kernel/syscalls/getrlimit/getrlimit03.c
+index e4d56c4..319bc49 100644
+--- a/testcases/kernel/syscalls/getrlimit/getrlimit03.c
++++ b/testcases/kernel/syscalls/getrlimit/getrlimit03.c
+@@ -26,6 +26,7 @@
+ 
+ #include "tst_test.h"
+ #include "lapi/syscalls.h"
++#include "lapi/abisize.h"
+ 
+ /**
+  * Linux provides an "old" getrlimit syscall handler that uses signed long,
+@@ -61,7 +62,12 @@ struct rlimit_ulong {
+ 	unsigned long rlim_cur;
+ 	unsigned long rlim_max;
+ };
+-const unsigned long RLIM_INFINITY_UL = ULONG_MAX;
++
++#if defined(__mips__) && defined(TST_ABI32)
++	const unsigned long RLIM_INFINITY_UL = 0x7fffffffUL;
++#else
++	const unsigned long RLIM_INFINITY_UL = ULONG_MAX;
++#endif
+ 
+ static int getrlimit_ulong(int resource, struct rlimit_ulong *rlim)
+ {
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
deleted file mode 100644
index 6c5f360..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From b216435bb362df10c45f544b78d8c884eaa901fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:01:02 +0000
-Subject: [PATCH 21/32] Define _GNU_SOURCE for MREMAP_MAYMOVE definition
-
-musl guards MREMAP_MAYMOVE with _GNU_SOURCE unlike glibc which uses
-__USE_GNU
-
-Fixes errors like
-error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/syscalls/mremap/mremap01.c | 4 +++-
- testcases/kernel/syscalls/mremap/mremap02.c | 2 ++
- testcases/kernel/syscalls/mremap/mremap03.c | 2 ++
- 3 files changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
-index d63d1e4..24ca174 100644
---- a/testcases/kernel/syscalls/mremap/mremap01.c
-+++ b/testcases/kernel/syscalls/mremap/mremap01.c
-@@ -76,10 +76,12 @@
-  */
- #include <unistd.h>
- #include <errno.h>
-+#include <fcntl.h>
-+#define _GNU_SOURCE
- #define __USE_GNU
- #include <sys/mman.h>
- #undef __USE_GNU
--#include <fcntl.h>
-+#undef _GNU_SOURCE
- 
- #include "test.h"
- #include "safe_macros.h"
-diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
-index 5a51b9a..a530a6b 100644
---- a/testcases/kernel/syscalls/mremap/mremap02.c
-+++ b/testcases/kernel/syscalls/mremap/mremap02.c
-@@ -75,9 +75,11 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#define _GNU_SOURCE
- #define __USE_GNU
- #include <sys/mman.h>
- #undef __USE_GNU
-+#undef _GNU_SOURCE
- 
- #include "test.h"
- 
-diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
-index 12e3829..9b39f8b 100644
---- a/testcases/kernel/syscalls/mremap/mremap03.c
-+++ b/testcases/kernel/syscalls/mremap/mremap03.c
-@@ -76,9 +76,11 @@
- #include <errno.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#define _GNU_SOURCE
- #define __USE_GNU
- #include <sys/mman.h>
- #undef __USE_GNU
-+#undef _GNU_SOURCE
- 
- #include "test.h"
- 
--- 
-2.7.0
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch b/poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
deleted file mode 100644
index 529f4ed..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 560347f77236616a635b4a997a0596b8da4d0799 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:08:25 +0000
-Subject: [PATCH 23/32] ptrace:  Use int instead of enum __ptrace_request
-
-__ptrace_request is only available with glibc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/syscalls/ptrace/ptrace03.c           | 4 ++++
- testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 4 ++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
-index a4028fc..f1880cd 100644
---- a/testcases/kernel/syscalls/ptrace/ptrace03.c
-+++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
-@@ -102,7 +102,11 @@ static pid_t unused_pid;
- static pid_t zero_pid;
- 
- struct test_case_t {
-+#ifdef __GLIBC__
- 	enum __ptrace_request request;
-+#else
-+	int request;
-+#endif
- 	pid_t *pid;
- 	int exp_errno;
- } test_cases[] = {
-diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
-index ae538e9..85aa89d 100644
---- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
-+++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
-@@ -130,7 +130,11 @@ static char *strings[] = {
- 	SPT(KILL)
- 	SPT(SINGLESTEP)
- };
-+#ifdef __GLIBC__
- static inline char *strptrace(enum __ptrace_request request)
-+#else
-+static inline char *strptrace(int request)
-+#endif
- {
- 	return strings[request];
- }
--- 
-2.7.0
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch b/poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
deleted file mode 100644
index 03aa45d..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From e01e9862c248dc90a8ec6f2d06f8469d7a50cd8e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:14:58 +0000
-Subject: [PATCH 24/32] rt_sigaction/rt_sigprocmark: Define _GNU_SOURCE
-
-Fixes musl build failure e.g.
-error: 'SA_NOMASK' undeclared here (not in a function)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c     | 1 +
- testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c     | 2 +-
- testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c     | 1 +
- testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c | 1 +
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
-index 5cf89cc..bdcb91a 100644
---- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
-+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
-@@ -28,6 +28,7 @@
- /*		sigset_t type.                       			      */
- /******************************************************************************/
- 
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
-index a1da743..8a27a0f 100644
---- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
-+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
-@@ -23,7 +23,7 @@
- /* Description: This tests the rt_sigaction() syscall                         */
- /*		rt_sigaction Expected EFAULT error check                      */
- /******************************************************************************/
--
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
-index 175d220..e7627cd 100644
---- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
-+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
-@@ -24,6 +24,7 @@
- /*		rt_sigaction Expected EINVAL error check                      */
- /******************************************************************************/
- 
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-diff --git a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
-index 74e5a61..75c57fc 100644
---- a/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
-+++ b/testcases/kernel/syscalls/rt_sigprocmask/rt_sigprocmask01.c
-@@ -39,6 +39,7 @@
- /*		    sigsetsize should indicate the size of a sigset_t type.   */
- /******************************************************************************/
- 
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <signal.h>
- #include <errno.h>
--- 
-2.7.0
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch b/poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
deleted file mode 100644
index f65fad1..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0133a2b29d6f48d8e2bba6a3be581cdfa91311a6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:21:05 +0000
-Subject: [PATCH 26/32] crash01: Define _GNU_SOURCE
-
-Fixes musl build errors like
-error: 'SA_NOMASK' undeclared (first use in this function)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- testcases/misc/crash/crash01.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/misc/crash/crash01.c b/testcases/misc/crash/crash01.c
-index 0574521..08a02e7 100644
---- a/testcases/misc/crash/crash01.c
-+++ b/testcases/misc/crash/crash01.c
-@@ -49,7 +49,7 @@ stress test at the same time you run other tests, like a multi-user
- benchmark.
- 
- */
--
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--- 
-2.7.0
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch b/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
deleted file mode 100644
index 40ee894..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 94557fb7e1293c61145c959b8c5ffecf4a2b1069 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 8 Jan 2016 07:24:44 +0000
-Subject: [PATCH 28/32] rt_sigaction.h: Use sighandler_t instead of
- __sighandler_t
-
-When _GNU_SOURCE is used then both typedefs are same and using
-sighandler_t makes it work on musl too
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- include/lapi/rt_sigaction.h                      | 4 ++--
- testcases/kernel/syscalls/rt_sigsuspend/Makefile | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/include/lapi/rt_sigaction.h b/include/lapi/rt_sigaction.h
-index 18236db..15facda 100644
---- a/include/lapi/rt_sigaction.h
-+++ b/include/lapi/rt_sigaction.h
-@@ -36,12 +36,12 @@
- #if defined(__mips__)
- struct kernel_sigaction {
- 	unsigned int sa_flags;
--	__sighandler_t k_sa_handler;
-+	sighandler_t k_sa_handler;
- 	sigset_t sa_mask;
- };
- #else
- struct kernel_sigaction {
--	__sighandler_t k_sa_handler;
-+	sighandler_t k_sa_handler;
- 	unsigned long sa_flags;
- 	void (*sa_restorer) (void);
- 	sigset_t sa_mask;
-diff --git a/testcases/kernel/syscalls/rt_sigsuspend/Makefile b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
-index 37bc3a9..2ca7f7c 100644
---- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile
-+++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
-@@ -19,4 +19,7 @@
- top_srcdir		?= ../../../..
- 
- include $(top_srcdir)/include/mk/testcases.mk
-+
-+CFLAGS	+= -D_GNU_SOURCE
-+
- include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch b/poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
deleted file mode 100644
index c2ef899..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 5a77e2bdc083f4f842a8ba7c2db1a7ac6e5f0664 Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Wed, 31 May 2017 21:26:05 -0400
-Subject: [PATCH] Add periodic output for long time test.
-
-This is needed in context of having scripts running ltp tests and
-waiting with a timeout for the output of the tests.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- .../kernel/controllers/memcg/stress/memcg_stress_test.sh      | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
-index af1a708..084e628 100755
---- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
-+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
-@@ -37,7 +37,8 @@ if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then
-         exit 0
- fi
- 
--RUN_TIME=$(( 15 * 60 ))
-+ONE_MINUTE=60
-+RUN_TIME=15
- 
- cleanup()
- {
-@@ -62,7 +63,7 @@ do_mount()
- # $1 - Number of cgroups
- # $2 - Allocated how much memory in one process? in MB
- # $3 - The interval to touch memory in a process
--# $4 - How long does this test run ? in second
-+# $4 - How long does this test run ? in minutes
- run_stress()
- {
- 	do_mount;
-@@ -81,7 +82,11 @@ run_stress()
- 		eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
- 	done
- 
--	sleep $4
-+	for i in $(seq 0 $(($4-1)))
-+	do
-+		eval echo "Started $i min ago. Still alive... "
-+		sleep $ONE_MINUTE
-+	done
- 
- 	for i in $(seq 0 $(($1-1)))
- 	do
--- 
-2.8.1
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
deleted file mode 100644
index ec5e2ef..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-From 04da9478887e705ea38e4f097492da20e651686c Mon Sep 17 00:00:00 2001
-From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
-Date: Wed, 13 Sep 2017 15:48:42 +0800
-Subject: [PATCH] commands/ar01: Fix for test in deterministic mode
-
-If binutils was configured with --enable-deterministic-archives,
-ar will run in deterministic mode by default, and use zero for
-timestamps and uids/gids, which makes the test case abnormal.
-
-Fix this by add the "U" modifier when deterministic mode is default.
-
-Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
-Signed-off-by: Fei Jie <feij.fnst@cn.fujitsu.com>
-
-Upstream-Status: Backport
-[http://lists.linux.it/pipermail/ltp/2017-September/005668.html]
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
----
- testcases/commands/ar/ar01 | 92 ++++++++++++++++++++++++++--------------------
- 1 file changed, 52 insertions(+), 40 deletions(-)
-
-diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
-index be105f6da..813a51d9c 100644
---- a/testcases/commands/ar/ar01
-+++ b/testcases/commands/ar/ar01
-@@ -24,16 +24,28 @@
- #
- AR="${AR:=ar}"
- TST_CNT=17
-+TST_SETUP=setup
- TST_TESTFUNC=test
- TST_NEEDS_TMPDIR=1
- TST_NEEDS_CMDS="$AR"
- 
- . tst_test.sh
- 
-+setup()
-+{
-+	ar --help | grep "use zero for timestamps and uids/gids (default)" \
-+		>/dev/null
-+	if [ $? -eq 0 ]; then
-+		MOD="U"
-+	else
-+		MOD=""
-+	fi
-+}
-+
- test1()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
--	ROD ar -ra file1.in lib.a $TST_DATAROOT/file2.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
-+	ROD ar -ra"$MOD" file1.in lib.a $TST_DATAROOT/file2.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -50,9 +62,9 @@ test1()
- 
- test2()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
--		         $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
--	ROD ar -ma file1.in lib.a file4.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
-+			       $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
-+	ROD ar -ma"$MOD" file1.in lib.a file4.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -69,8 +81,8 @@ test2()
- 
- test3()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
--	ROD ar -rb file3.in lib.a $TST_DATAROOT/file2.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
-+	ROD ar -rb"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -87,9 +99,9 @@ test3()
- 
- test4()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
--	                 $TST_DATAROOT/file2.in
--	ROD ar -mb file3.in lib.a file2.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
-+			       $TST_DATAROOT/file2.in
-+	ROD ar -mb"$MOD" file3.in lib.a file2.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -106,7 +118,7 @@ test4()
- 
- test5()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in \> ar.out
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
- 
- 	if [ -s ar.out ]; then
- 		tst_res TFAIL "ar produced output unexpectedly (-c)"
-@@ -120,7 +132,7 @@ test5()
- 
- test6()
- {
--	ROD ar -qc lib.a $TST_DATAROOT/file1.in \> ar.out
-+	ROD ar -qc"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
- 
- 	if [ -s ar.out ]; then
- 		tst_res TFAIL "ar produced output unexpectedly (-qc)"
-@@ -134,9 +146,9 @@ test6()
- 
- test7()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
--	                 $TST_DATAROOT/file3.in
--	ROD ar -d lib.a file1.in file2.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
-+			       $TST_DATAROOT/file3.in
-+	ROD ar -d"$MOD" lib.a file1.in file2.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file3.in\n" > ar.exp
-@@ -153,9 +165,9 @@ test7()
- 
- test8()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
--	                 $TST_DATAROOT/file3.in
--	ROD ar -d lib.a
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
-+			       $TST_DATAROOT/file3.in
-+	ROD ar -d"$MOD" lib.a
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -172,8 +184,8 @@ test8()
- 
- test9()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
--	ROD ar -ri file3.in lib.a $TST_DATAROOT/file2.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
-+	ROD ar -ri"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -190,9 +202,9 @@ test9()
- 
- test10()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
--	                 $TST_DATAROOT/file2.in
--	ROD ar -mi file3.in lib.a file2.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
-+			       $TST_DATAROOT/file2.in
-+	ROD ar -mi"$MOD" file3.in lib.a file2.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -209,9 +221,9 @@ test10()
- 
- test11()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
--	                 $TST_DATAROOT/file2.in
--	ROD ar -m lib.a file3.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
-+			       $TST_DATAROOT/file2.in
-+	ROD ar -m"$MOD" lib.a file3.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
-@@ -228,9 +240,9 @@ test11()
- 
- test12()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
--	                 $TST_DATAROOT/file3.in
--	ROD ar -p lib.a \> ar.out
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
-+			       $TST_DATAROOT/file3.in
-+	ROD ar -p"$MOD" lib.a \> ar.out
- 
- 	printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp
- 
-@@ -247,9 +259,9 @@ test12()
- test13()
- {
- 
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
--	                 $TST_DATAROOT/file3.in
--	ROD ar -q lib.a $TST_DATAROOT/file4.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
-+			       $TST_DATAROOT/file3.in
-+	ROD ar -q"$MOD" lib.a $TST_DATAROOT/file4.in
- 	ROD ar -t lib.a \> ar.out
- 
- 	printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp
-@@ -267,14 +279,14 @@ test13()
- test14()
- {
- 	ROD touch file0.in
--	ROD ar -cr lib.a file0.in $TST_DATAROOT/file1.in
-+	ROD ar -cr"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
- 
- 	file0_mtime1=$(ar -tv lib.a | grep file0.in)
- 	file1_mtime1=$(ar -tv lib.a | grep file1.in)
- 
- 	touch -c -t $(date --date='next day' +"%Y%m%d%H%M") file0.in
- 
--	ROD ar -ru lib.a file0.in $TST_DATAROOT/file1.in
-+	ROD ar -ru"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
- 
- 	file0_mtime2=$(ar -tv lib.a | grep file0.in)
- 	file1_mtime2=$(ar -tv lib.a | grep file1.in)
-@@ -296,7 +308,7 @@ test14()
- 
- test15()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in
- 	ROD ar -tv lib.a \> ar.out
- 
- 	if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then
-@@ -311,9 +323,9 @@ test15()
- 
- test16()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
--	                 $TST_DATAROOT/file3.in
--	ROD ar -xv lib.a \> ar.out
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
-+			       $TST_DATAROOT/file3.in
-+	ROD ar -xv"$MOD" lib.a \> ar.out
- 
- 	printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp
- 
-@@ -335,8 +347,8 @@ test16()
- 
- test17()
- {
--	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
--	ROD ar -xv lib.a file2.in \> ar.out
-+	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
-+	ROD ar -xv"$MOD" lib.a file2.in \> ar.out
- 
- 	printf "x - file2.in\n" > ar.exp
- 
--- 
-2.19.0.rc2
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch b/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch
deleted file mode 100644
index c324463..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 34b91edc70709f32b44f6b3a32c8f18db393e36c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
-Date: Wed, 20 Feb 2019 08:07:27 -0600
-Subject: [PATCH] Define __SIGRTMIN and __SIGRTMAX for MUSL
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Some libc implementations might differ in the definitions they
-include. Exempli gratia: MUSL does not define __SIGRTMAX nor
-__SIGRTMIN.
-
-These two tests fail to build because of the missing
-definitions:
-  testcases/kernel/syscalls/ptrace/ptrace05.c
-  testcases/kernel/syscalls/sighold/sighold02.c
-
-Out of precaution, these two also include this header:
-  lib/tst_sig.c
-  testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
-
-Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2019-February/010916.html]
-
-Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
----
- include/lapi/signal.h                         | 24 +++++++++++++++++++
- lib/tst_sig.c                                 |  1 +
- testcases/kernel/syscalls/ptrace/ptrace05.c   |  1 +
- .../syscalls/rt_sigsuspend/rt_sigsuspend01.c  |  1 +
- testcases/kernel/syscalls/sighold/sighold02.c |  1 +
- 5 files changed, 28 insertions(+)
- create mode 100644 include/lapi/signal.h
-
-diff --git a/include/lapi/signal.h b/include/lapi/signal.h
-new file mode 100644
-index 000000000..d22965a94
---- /dev/null
-+++ b/include/lapi/signal.h
-@@ -0,0 +1,24 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later
-+/*
-+ * Copyright (c) 2019 Linaro Limited. All rights reserved.
-+ * Author: Daniel Díaz <daniel.diaz@linaro.org>
-+ */
-+
-+#ifndef LAPI_SIGNAL_H
-+#define LAPI_SIGNAL_H
-+
-+#include <signal.h>
-+
-+/*
-+ * Some libc implementations might differ in the definitions they include. This
-+ * covers those differences for all tests to successfully build.
-+ */
-+
-+#ifndef __SIGRTMIN
-+# define __SIGRTMIN 32
-+#endif
-+#ifndef __SIGRTMAX
-+# define __SIGRTMAX (_NSIG - 1)
-+#endif
-+
-+#endif
-diff --git a/lib/tst_sig.c b/lib/tst_sig.c
-index 36565e13d..6d77aeafd 100644
---- a/lib/tst_sig.c
-+++ b/lib/tst_sig.c
-@@ -72,6 +72,7 @@
- #include <signal.h>
- #include <unistd.h>
- #include "test.h"
-+#include "lapi/signal.h"
- 
- #define MAXMESG 150		/* size of mesg string sent to tst_res */
- 
-diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c
-index 420330029..54cfa4d7b 100644
---- a/testcases/kernel/syscalls/ptrace/ptrace05.c
-+++ b/testcases/kernel/syscalls/ptrace/ptrace05.c
-@@ -38,6 +38,7 @@
- #include "ptrace.h"
- 
- #include "test.h"
-+#include "lapi/signal.h"
- 
- char *TCID = "ptrace05";
- int TST_TOTAL = 0;
-diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
-index f17a9aae6..e577cf227 100644
---- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
-+++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
-@@ -18,6 +18,7 @@
- #include "tst_test.h"
- #include "lapi/syscalls.h"
- #include "lapi/safe_rt_signal.h"
-+#include "lapi/signal.h"
- 
- static void sig_handler(int sig)
- {
-diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
-index d1d4b0b06..b763142df 100644
---- a/testcases/kernel/syscalls/sighold/sighold02.c
-+++ b/testcases/kernel/syscalls/sighold/sighold02.c
-@@ -49,6 +49,7 @@
- #include <sys/wait.h>
- #include "test.h"
- #include "safe_macros.h"
-+#include "lapi/signal.h"
- 
- /* _XOPEN_SOURCE disables NSIG */
- #ifndef NSIG
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch b/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch
deleted file mode 100644
index 2444914..0000000
--- a/poky/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 430e05c2169ed15aaa6d7f9459edd607603cee02 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
-Date: Mon, 25 Feb 2019 10:44:33 -0600
-Subject: [PATCH] setregid01: Fix security warning for string formatting
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GCC 8.2.0 complains with the following:
-  setregid01.c: In function 'run':
-  setregid01.c:47:3: error: format not a string literal and no format arguments [-Werror=format-security]
-     tst_res(TFAIL | TTERRNO, tc->msg);
-     ^~~~~~~
-because there is no string formatting in the message. This can
-be seen with CFLAGS set to:
-  -Wformat -Wformat-security -Werror=format-security
-as Yocto Project's Poky does, e.g.:
-  http://errors.yoctoproject.org/Errors/Details/230043/
-
-Upstream-Status: Backport [46e1eda55f188810e6bf3a939b92d604321807ae]
-
-Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
-Reviewed-by: Enji Cooper <yaneurabeya@gmail.com>
----
- testcases/kernel/syscalls/setregid/setregid01.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c
-index f2e41e134..8c9e11918 100644
---- a/testcases/kernel/syscalls/setregid/setregid01.c
-+++ b/testcases/kernel/syscalls/setregid/setregid01.c
-@@ -44,9 +44,9 @@ static void run(unsigned int n)
- 	TEST(SETREGID(*tc->arg1, *tc->arg2));
- 
- 	if (TST_RET == -1)
--		tst_res(TFAIL | TTERRNO, tc->msg);
-+		tst_res(TFAIL | TTERRNO, "%s", tc->msg);
- 	else
--		tst_res(TPASS, tc->msg);
-+		tst_res(TPASS, "%s", tc->msg);
- }
- 
- static void setup(void)
--- 
-2.17.1
-
diff --git a/poky/meta/recipes-extended/ltp/ltp_20190115.bb b/poky/meta/recipes-extended/ltp/ltp_20190517.bb
similarity index 76%
rename from poky/meta/recipes-extended/ltp/ltp_20190115.bb
rename to poky/meta/recipes-extended/ltp/ltp_20190517.bb
index 1d0c00b..1f3a94b 100644
--- a/poky/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/poky/meta/recipes-extended/ltp/ltp_20190517.bb
@@ -27,29 +27,21 @@
 
 CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
 CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
-SRCREV = "a6a5caef13632e669dda27b0461726eba546a2f3"
+SRCREV = "ac33ef87f0b9dc56533026435be3ea8c67ce86d2"
 
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
-           file://0004-build-Add-option-to-select-libc-implementation.patch \
-           file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
-           file://0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch \
-           file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
-           file://0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch \
-           file://0018-guard-mallocopt-with-__GLIBC__.patch \
-           file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
-           file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
-           file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
-           file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
-           file://0026-crash01-Define-_GNU_SOURCE.patch \
-           file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
-           file://0034-periodic_output.patch \
-           file://0035-fix-test_proc_kill-hang.patch \
-           file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
-           file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
-           file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
-           file://define-sigrtmin-and-sigrtmax-for-musl.patch \
-           file://setregid01-security-string-formatting.patch \
-           file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
+           file://0001-build-Add-option-to-select-libc-implementation.patch \
+           file://0002-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
+           file://0003-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
+           file://0004-guard-mallocopt-with-__GLIBC__.patch \
+           file://0005-getdents-define-getdents-getdents64-only-for-glibc.patch \
+           file://0006-rt_tgsigqueueinfo-disable-test-on-musl.patch \
+           file://0007-Fix-test_proc_kill-hanging.patch \
+           file://0008-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
+           file://0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
+           file://0010-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \
+           file://0011-direct_io-diotest4-drop-MAP_FIXED.patch \
+           file://0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch \
            "
 
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-extended/mc/mc_4.8.22.bb b/poky/meta/recipes-extended/mc/mc_4.8.23.bb
similarity index 93%
rename from poky/meta/recipes-extended/mc/mc_4.8.22.bb
rename to poky/meta/recipes-extended/mc/mc_4.8.23.bb
index f64effb..83de8db 100644
--- a/poky/meta/recipes-extended/mc/mc_4.8.22.bb
+++ b/poky/meta/recipes-extended/mc/mc_4.8.23.bb
@@ -9,8 +9,8 @@
 SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
            file://0001-mc-replace-perl-w-with-use-warnings.patch \
            "
-SRC_URI[md5sum] = "29983a215c96030f06d5b112088ec5dc"
-SRC_URI[sha256sum] = "8d9f1c75369967adfd317a05fef9861444ed049b033e4debaeaafc6df218b431"
+SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89"
+SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d"
 
 inherit autotools gettext pkgconfig
 
diff --git a/poky/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch b/poky/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch
new file mode 100644
index 0000000..b196084
--- /dev/null
+++ b/poky/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch
@@ -0,0 +1,53 @@
+From 02a41c3fd560fb5250186dd6b3cff6b21daa2e2b Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 15 Jul 2019 14:12:24 +0800
+Subject: [PATCH] Revert "tests: wait for complete rebuild in integrity checks"
+
+This reverts commit e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74
+as the logic "check state 'U*'" will make the test enters
+infinite loop especially in qemu env, so revert it to
+use the previous logic "check wait" which also used
+commonly by other tests such as tests/02r5grow, tests/07revert-grow
+and etc.
+
+Upstream-Status: Submitted[https://marc.info/?l=linux-raid&m=156317157314030&w=2]
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ tests/01r5integ    | 2 +-
+ tests/01raid6integ | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/01r5integ b/tests/01r5integ
+index 48676a2..ffb30ce 100644
+--- a/tests/01r5integ
++++ b/tests/01r5integ
+@@ -27,7 +27,7 @@ do
+      exit 1
+     fi
+     mdadm $md0 -a $i
+-    while ! (check state 'U*'); do check wait; sleep 0.2; done
++   check wait
+   done
+   mdadm -S $md0
+ done
+diff --git a/tests/01raid6integ b/tests/01raid6integ
+index 12f4d81..c6fcdae 100644
+--- a/tests/01raid6integ
++++ b/tests/01raid6integ
+@@ -47,10 +47,10 @@ do
+          exit 1
+        fi
+        mdadm $md0 -a $first
+-       while ! (check state 'U*_U*'); do check wait; sleep 0.2; done
++       check wait
+     done
+     mdadm $md0 -a $second
+-    while ! (check state 'U*'); do check wait; sleep 0.2; done
++    check wait
+     totest="$totest $second"
+   done
+   mdadm -S $md0
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch b/poky/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
new file mode 100644
index 0000000..e00287c
--- /dev/null
+++ b/poky/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
@@ -0,0 +1,28 @@
+From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 1 Jul 2019 11:34:49 +0800
+Subject: [PATCH] mdadm: add option -y for use syslog to recive event report
+
+fix service startup failed when there is
+No mail address or alert command
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ systemd/mdmonitor.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service
+index 46f7b88..3fc4687 100644
+--- a/systemd/mdmonitor.service
++++ b/systemd/mdmonitor.service
+@@ -13,4 +13,4 @@ DefaultDependencies=no
+ Environment=  MDADM_MONITOR_ARGS=--scan
+ EnvironmentFile=-/run/sysconfig/mdadm
+ ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
+-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
++ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-extended/mdadm/files/include_sysmacros.patch b/poky/meta/recipes-extended/mdadm/files/include_sysmacros.patch
new file mode 100644
index 0000000..8a1d834
--- /dev/null
+++ b/poky/meta/recipes-extended/mdadm/files/include_sysmacros.patch
@@ -0,0 +1,14 @@
+include sys/sysmacros.h for major/minor macro definitions
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/mdadm.h
++++ b/mdadm.h
+@@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd,
+ 
+ #include	<sys/types.h>
+ #include	<sys/stat.h>
++#include	<sys/sysmacros.h>
+ #include	<stdint.h>
+ #include	<stdlib.h>
+ #include	<time.h>
diff --git a/poky/meta/recipes-extended/mdadm/files/mdmonitor.service b/poky/meta/recipes-extended/mdadm/files/mdmonitor.service
deleted file mode 100644
index bd243b4..0000000
--- a/poky/meta/recipes-extended/mdadm/files/mdmonitor.service
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of mdadm.
-#
-#  mdadm is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Software RAID monitoring and management
-ConditionPathExists=/etc/mdadm.conf
-
-[Service]
-Type=forking
-PIDFile=/var/run/mdadm/mdadm.pid
-EnvironmentFile=-/etc/sysconfig/mdmonitor
-ExecStart=/sbin/mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/poky/meta/recipes-extended/mdadm/files/run-ptest b/poky/meta/recipes-extended/mdadm/files/run-ptest
index 234f973..e4a9c2b 100644
--- a/poky/meta/recipes-extended/mdadm/files/run-ptest
+++ b/poky/meta/recipes-extended/mdadm/files/run-ptest
@@ -1,19 +1,4 @@
 #!/bin/sh
 
-LOG="$(pwd)/test.log"
 # make the test continue to execute even one fail
-./test --keep-going 2>&1|tee ${LOG}
-# translate the test report
-# "tests/18imsm-r10_4d-takeover-r0_2d... succeeded" -> "PASS: tests/18imsm-r10_4d-takeover-r0_2d"
-# "tests/19raid6repair... FAILED - see //log for details" -> "FAIL: tests/19raid6repair"
-sed -i -e '/succeeded/ s/^/PASS: /' -e '/FAILED/ s/^/FAIL: /' ${LOG}
-sed -i -e 's/... FAILED//g' -e 's/... succeeded//g' ${LOG}
-passed=`grep PASS: ${LOG}|wc -l`
-failed=`grep FAIL: ${LOG}|wc -l`
-all=$((passed + failed))
-
-( echo "=== Test Summary ==="
-  echo "TOTAL: ${all}"
-  echo "PASSED: ${passed}"
-  echo "FAILED: ${failed}"
-) | tee -a /${LOG}
+./test --keep-going
diff --git a/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 494b81b..74c94f6 100644
--- a/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -18,8 +18,10 @@
            file://0001-Compute-abs-diff-in-a-standard-compliant-way.patch \
            file://0001-fix-gcc-8-format-truncation-warning.patch \
            file://debian-no-Werror.patch \
+           file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \
 	   file://mdadm.init \
-	   file://mdmonitor.service \
+	   file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
+           file://include_sysmacros.patch \
            "
 SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
 SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
@@ -65,7 +67,6 @@
         oe_runmake install-systemd DESTDIR=${D}
 }
 
-
 do_compile_ptest() {
 	oe_runmake test
 }
@@ -74,6 +75,14 @@
 	cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests
 	cp ${S}/test ${D}${PTEST_PATH}
 	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+        sed -i -e '/echo -ne "$_script... "/d' \
+               -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \
+               -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \
+               -e '/die "dmesg prints errors when testing $_basename!"/i\\t\t\t\techo -ne "FAIL: $_script" &&' \
+               ${D}${PTEST_PATH}/test
+
+        chmod +x ${D}${PTEST_PATH}/test
+
 	ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm
 	for prg in test_stripe swap_super raid6check
 	do
diff --git a/poky/meta/recipes-extended/msmtp/msmtp_1.8.4.bb b/poky/meta/recipes-extended/msmtp/msmtp_1.8.4.bb
index 888c1bb..0f10500 100644
--- a/poky/meta/recipes-extended/msmtp/msmtp_1.8.4.bb
+++ b/poky/meta/recipes-extended/msmtp/msmtp_1.8.4.bb
@@ -19,11 +19,10 @@
 EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
 
 ALTERNATIVE_${PN} = "sendmail"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}_linuxstdbase = "sendmail usr-lib-sendmail"
 ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
 ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
 ALTERNATIVE_PRIORITY = "100"
-
-pkg_postinst_${PN}_linuxstdbase () {
-	# /usr/lib/sendmial is required by LSB core test
-	[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
-}
diff --git a/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
index d38f545..2d96d1b 100644
--- a/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
+++ b/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -111,9 +111,6 @@
     patch \
     "
 
-VIRTUAL-RUNTIME_initscripts ?= "initscripts"
-VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
-VIRTUAL-RUNTIME_login_manager ?= "busybox"
 VIRTUAL-RUNTIME_syslog ?= "sysklogd"
 RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\
     ${VIRTUAL-RUNTIME_initscripts} \
diff --git a/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index e8dc421..a821fd8 100644
--- a/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -218,8 +218,6 @@
     gdk-pixbuf-loader-ani \
     gdk-pixbuf-xlib \
     liberation-fonts \
-    gtk+ \
-    atk \
     alsa-lib \
 "
 
diff --git a/poky/meta/recipes-extended/psmisc/psmisc.inc b/poky/meta/recipes-extended/psmisc/psmisc.inc
index 82ef947..594a10c 100644
--- a/poky/meta/recipes-extended/psmisc/psmisc.inc
+++ b/poky/meta/recipes-extended/psmisc/psmisc.inc
@@ -7,7 +7,7 @@
 processes identified by name.  The fuser command identifies the PIDs \
 of processes that are using specified files or filesystems."
 SECTION = "base"
-DEPENDS = "ncurses virtual/libintl"
+DEPENDS = "ncurses virtual/libintl gettext-native"
 LICENSE = "GPLv2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz"
diff --git a/poky/meta/recipes-extended/sysklogd/files/sysklogd b/poky/meta/recipes-extended/sysklogd/files/sysklogd
index 258f882..7342484 100755
--- a/poky/meta/recipes-extended/sysklogd/files/sysklogd
+++ b/poky/meta/recipes-extended/sysklogd/files/sysklogd
@@ -90,6 +90,22 @@
     return 0
 }
 
+waitpid ()
+{
+  pid=$1
+  # Give pid a chance to exit before we restart with a 5s timeout in 1s intervals
+  if [ -z "$pid" ]; then
+    return
+  fi
+  timeout=5;
+  while [ $timeout -gt 0 ]
+  do
+    timeout=$(( $timeout-1 ))
+    kill -0 $pid 2> /dev/null || break
+    sleep 1
+  done
+}
+
 case "$1" in
   start)
     log_begin_msg "Starting system log daemon..."
@@ -113,17 +129,23 @@
     start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd
     log_end_msg $?
     log_begin_msg "Reloading kernel log daemon..."
+    pid=`cat $pidfile_klogd 2> /dev/null`
     start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+    waitpid $pid
     start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
     log_end_msg $?
     ;;
   restart)
     log_begin_msg "Restarting system log daemon..."
+    pid=`cat $pidfile_syslogd 2> /dev/null`
     start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd
+    waitpid $pid
     start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
     log_end_msg $?
     log_begin_msg "Reloading kernel log daemon..."
+    pid=`cat $pidfile_klogd 2> /dev/null`
     start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+    waitpid $pid
     start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
     log_end_msg $?
     ;;
diff --git a/poky/meta/recipes-extended/sysstat/sysstat.inc b/poky/meta/recipes-extended/sysstat/sysstat.inc
index 4e29721..592cbf4 100644
--- a/poky/meta/recipes-extended/sysstat/sysstat.inc
+++ b/poky/meta/recipes-extended/sysstat/sysstat.inc
@@ -20,6 +20,7 @@
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
 PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
 
 EXTRA_OECONF += "--disable-stripping"
 
@@ -44,11 +45,13 @@
 	        install -d ${D}${sysconfdir}/tmpfiles.d
 	        echo "d ${localstatedir}/log/sa - - - -" \
 		     > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
-	fi
 
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
-	sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+	        if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 'true', d)}; then
+			install -d ${D}${systemd_unitdir}/system
+			install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
+			sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+	        fi
+	fi
 }
 
 pkg_postinst_${PN} () {
diff --git a/poky/meta/recipes-extended/timezone/timezone.inc b/poky/meta/recipes-extended/timezone/timezone.inc
index 1ade007..ce16524 100644
--- a/poky/meta/recipes-extended/timezone/timezone.inc
+++ b/poky/meta/recipes-extended/timezone/timezone.inc
@@ -4,7 +4,7 @@
 LICENSE = "PD & BSD & BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
 
-PV = "2019a"
+PV = "2019b"
 
 SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
            http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
@@ -12,7 +12,7 @@
 
 UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
 
-SRC_URI[tzcode.md5sum] = "27585a20bc5401324f42c8deb6e4677f"
-SRC_URI[tzcode.sha256sum] = "8739f162bc30cdfb482435697f969253abea49595541a0afd5f443fbae433ff5"
-SRC_URI[tzdata.md5sum] = "288f7b1e43018c633da108f13b27cf91"
-SRC_URI[tzdata.sha256sum] = "90366ddf4aa03e37a16cd49255af77f801822310b213f195e2206ead48c59772"
+SRC_URI[tzcode.md5sum] = "91e0978d947496fd6aaf46d351f9c41d"
+SRC_URI[tzcode.sha256sum] = "2e479d409337da41408629ce6c3b4d8410b10ba6d4431d862e22d2b137d7756d"
+SRC_URI[tzdata.md5sum] = "b26b5d7d844cb96c73ed2fb6d588daaf"
+SRC_URI[tzdata.sha256sum] = "05d9092c90dcf9ec4f3ccfdea80c7dcea5e882b3b105c3422da172aaa9a50c64"
diff --git a/poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.22.3.bb b/poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.22.3.bb
deleted file mode 100644
index 55ee277..0000000
--- a/poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.22.3.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "GTK+2 standard themes"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/gnome-themes-standard/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-inherit autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-DEPENDS += "intltool-native gtk+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-          "
-
-SRC_URI[md5sum] = "b51c362b157b6407303d44f93c31ee11"
-SRC_URI[sha256sum] = "61dc87c52261cfd5b94d65e8ffd923ddeb5d3944562f84942eeeb197ab8ab56a"
-
-EXTRA_OECONF = "--disable-gtk3-engine"
-
-do_install_append() {
-        # Only building Adwaita, remove highcontrast files
-        rm -rf ${D}${prefix}/share/themes/HighContrast \
-               ${D}${prefix}/share/icons
-
-	# The libtool archive file is unneeded with shared libs on modern Linux
-	rm -rf ${D}${libdir}/gtk-2.0/2.10.0/engines/libadwaita.la
-}
-
-# There could be gnome-theme-highcontrast as well but that requires
-# gtk+3 and includes lots of icons (is also broken with B != S).
-PACKAGES += "gnome-theme-adwaita \
-             gnome-theme-adwaita-dark \
-             "
-
-FILES_gnome-theme-adwaita = "${prefix}/share/themes/Adwaita \
-                              ${libdir}/gtk-2.0/2.10.0/engines/libadwaita.so"
-
-FILES_gnome-theme-adwaita-dark = "${prefix}/share/themes/Adwaita-dark"
-RDEPENDS_gnome-theme-adwaita-dark = "gnome-theme-adwaita"
-
-# gnome-themes-standard is empty and doesn't exist
-RDEPENDS_${PN}-dev = ""
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+.inc b/poky/meta/recipes-gnome/gtk+/gtk+.inc
deleted file mode 100644
index d6d14a7..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+.inc
+++ /dev/null
@@ -1,107 +0,0 @@
-SUMMARY = "Multi-platform toolkit for creating GUIs"
-DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
-set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
-HOMEPAGE = "http://www.gtk.org"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-SECTION = "libs"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-# This picks stable releases in the 2.x series (but not 2.90 onwards,
-# which were GNOME 3 betas).
-UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
-
-X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
-DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native \
- cairo gdk-pixbuf"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb x11', d)}"
-
-PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
-# without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
-PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
-PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog, --disable-man, libxslt-native xmlto-native"
-
-inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection manpages
-
-PACKAGES += "libgail gtk-demo"
-
-FILES_${PN} += "${bindir}/gtk-update-icon-cache-2.0 \
-	${bindir}/gtk-query-immodules-2.0 \
-	${datadir}/themes ${sysconfdir} \
-	${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
-
-FILES_${PN}-dev += " \
-        ${datadir}/gtk-2.0/include \
-	${libdir}/gtk-2.0/include \
-	${libdir}/gtk-2.0/modules/*.la \
-	${libdir}/gtk-2.0/${LIBV}/loaders/*.la \
-	${libdir}/gtk-2.0/${LIBV}/immodules/*.la \
-	${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \
-	${libdir}/gtk-2.0/${LIBV}/engines/*.la \
-	${bindir}/gtk-builder-convert"
-
-FILES_gtk-demo = " \
- ${datadir}/gtk-2.0/demo/* \
- ${bindir}/gtk-demo \
- "
-
-FILES_libgail = " \
-	${libdir}/gtk-2.0/modules/libgail.so \
-	${libdir}/gtk-2.0/modules/libferret.so \
-	"
-
-GTKBASE_RRECOMMENDS ?= "liberation-fonts \
-                        gdk-pixbuf-loader-png \
-                        gdk-pixbuf-loader-jpeg \
-                        gdk-pixbuf-loader-gif \
-                        gdk-pixbuf-loader-xpm \
-                        shared-mime-info \
-                        gnome-theme-adwaita \
-                        "
-GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
-
-RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
-RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
-
-ALTERNATIVE_${PN} = "gtk-update-icon-cache"
-ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0"
-
-do_compile_prepend() {
-        export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
-}
-
-do_install () {
-	autotools_do_install
-
-	install -d ${D}${sysconfdir}/gtk-2.0
-
-	mkdir -p ${D}${libdir}/gtk-2.0/include
-	install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
-
-	install -m 0644 ${S}/gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/
-	install -m 0644 ${S}/gtk/gtkfilechooserutils.h   ${D}${includedir}/gtk-2.0/gtk/
-	install -m 0644 ${S}/gtk/gtkfilesystemmodel.h    ${D}${includedir}/gtk-2.0/gtk/
-
-	mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
-
-    # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache
-    mkdir -p ${D}${libexecdir}
-    ln ${D}${bindir}/gtk-query-immodules-2.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-2.0
-}
-
-SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
-
-gtk_sysroot_preprocess () {
-	if [ -e ${D}${bindir}/gtk-builder-convert ]; then
-		install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-		install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-	fi
-}
-
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+/0001-Do-not-look-into-HOME-when-looking-for-gtk-modules.patch b/poky/meta/recipes-gnome/gtk+/gtk+/0001-Do-not-look-into-HOME-when-looking-for-gtk-modules.patch
deleted file mode 100644
index 83be39c..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+/0001-Do-not-look-into-HOME-when-looking-for-gtk-modules.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 34ce93e1c50bfb88f92a687d4f82de55584f3f6a Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 11 Apr 2018 14:20:39 +0300
-Subject: [PATCH] Do not look into $HOME when looking for gtk modules
-
-On the host it causes host contamination, on the target it's a
-potential security issue. Gtk+3 has already removed this.
-
-Upstream-Status: Inappropriate [gtk2 is in maintenance mode]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- gtk/gtkmodules.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
-index 50729b6..e09b583 100644
---- a/gtk/gtkmodules.c
-+++ b/gtk/gtkmodules.c
-@@ -65,10 +65,6 @@ get_module_path (void)
-   if (result)
-     return result;
- 
--  home_dir = g_get_home_dir();
--  if (home_dir)
--    home_gtk_dir = g_build_filename (home_dir, ".gtk-2.0", NULL);
--
-   module_path_env = g_getenv ("GTK_PATH");
-   exe_prefix = g_getenv ("GTK_EXE_PREFIX");
- 
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch b/poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
deleted file mode 100644
index 74e479f..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+/doc-fixes.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-There are issues building the gtk+ tutorial and faq documentation.
-Since they were removed in gtk+ upstream and are superfluous in
-embedded applications, just don't build them.
-
-Thanks to Joshua Lock for suggesting this approach.
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-diff -urN gtk+-2.22.1.orig/docs/Makefile.am gtk+-2.22.1/docs/Makefile.am
---- gtk+-2.22.1.orig/docs/Makefile.am	2010-11-15 04:13:09.000000000 -0800
-+++ gtk+-2.22.1/docs/Makefile.am	2011-02-23 19:25:16.914815097 -0800
-@@ -1,7 +1,7 @@
- ## Process this file with automake to produce Makefile.in
- include $(top_srcdir)/Makefile.decl
- 
--SUBDIRS = tutorial faq reference tools
-+SUBDIRS = reference tools
- 
- EXTRA_DIST += \
- 	defsformat.txt			\
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch b/poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
deleted file mode 100644
index 9eb7f6b..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+/hardcoded_libtool.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Updated to apply to gtk+-2.24.15
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-Index: gtk+-2.24.31/configure.ac
-===================================================================
---- gtk+-2.24.31.orig/configure.ac
-+++ gtk+-2.24.31/configure.ac
-@@ -415,7 +415,7 @@ AC_MSG_CHECKING([Whether to write depend
- case $enable_explicit_deps in
-   auto)
-     export SED
--    deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+    deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-     if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
-       enable_explicit_deps=yes  
-     else
-@@ -772,7 +772,7 @@ else
-     dnl Now we check to see if our libtool supports shared lib deps
-     dnl (in a rather ugly way even)
-     if $dynworks; then
--        module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+        module_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
-         module_deplibs_check=`$module_libtool_config | \
-             grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
-             sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1579,7 +1579,7 @@ fi
- # We are using gmodule-no-export now, but I'm leaving the stripping
- # code in place for now, since pango and atk still require gmodule.
- export SED
--export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- if test -n "$export_dynamic"; then
-   GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
-   GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch b/poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch
deleted file mode 100644
index 96e1f5f..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+/strict-prototypes.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Fixes
-
-include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
- typedef void (*GtkItemFactoryCallback)  ();
-
-gcc5 has -Wstrict-prototypes on by default for -Werror so this becomes a build failure for consumers
-of this header e.g. matchbox-panel-2
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: gtk+-2.24.27/gtk/gtkitemfactory.h
-===================================================================
---- gtk+-2.24.27.orig/gtk/gtkitemfactory.h
-+++ gtk+-2.24.27/gtk/gtkitemfactory.h
-@@ -44,7 +44,7 @@ typedef void	(*GtkPrintFunc)		   (gpoint
-  * (Note that if we are included from a C++ program () will mean
-  * (void) so an explicit cast will be needed.)
-  */
--typedef	void	(*GtkItemFactoryCallback)  ();
-+typedef	void	(*GtkItemFactoryCallback)  (void);
- typedef	void	(*GtkItemFactoryCallback1) (gpointer		 callback_data,
- 					    guint		 callback_action,
- 					    GtkWidget		*widget);
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff b/poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
deleted file mode 100644
index 340d120..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+/toggle-font.diff
+++ /dev/null
@@ -1,102 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk/gtkcellrenderertoggle.c
-===================================================================
---- gtk/gtkcellrenderertoggle.c.orig	2010-06-22 18:11:33.000000000 +0800
-+++ gtk/gtkcellrenderertoggle.c	2010-06-22 18:11:43.000000000 +0800
-@@ -71,6 +71,8 @@
-   PROP_INDICATOR_SIZE
- };
- 
-+/* This is a hard-coded default which promptly gets overridden by a size
-+   calculated from the font size. */
- #define TOGGLE_WIDTH 13
- 
- static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
-@@ -80,8 +82,9 @@
- typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
- struct _GtkCellRendererTogglePrivate
- {
--  gint indicator_size;
--
-+  gint indicator_size; /* This is the real size */
-+  gint override_size; /* This is the size set from the indicator-size property */
-+  GtkWidget *cached_widget;
-   guint inconsistent : 1;
- };
- 
-@@ -104,6 +107,7 @@
-   GTK_CELL_RENDERER (celltoggle)->ypad = 2;
- 
-   priv->indicator_size = TOGGLE_WIDTH;
-+  priv->override_size = 0;
-   priv->inconsistent = FALSE;
- }
- 
-@@ -210,7 +214,7 @@
-       g_value_set_boolean (value, celltoggle->radio);
-       break;
-     case PROP_INDICATOR_SIZE:
--      g_value_set_int (value, priv->indicator_size);
-+      g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
-       break;
-     default:
-       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
-@@ -245,7 +249,7 @@
-       celltoggle->radio = g_value_get_boolean (value);
-       break;
-     case PROP_INDICATOR_SIZE:
--      priv->indicator_size = g_value_get_int (value);
-+      priv->override_size = g_value_get_int (value);
-       break;
-     default:
-       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
-@@ -273,6 +277,27 @@
- }
- 
- static void
-+on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
-+{
-+  GtkCellRendererTogglePrivate *priv = user_data;
-+  PangoContext *context;
-+  PangoFontMetrics *metrics;
-+  int height;
-+  
-+  context = gtk_widget_get_pango_context (widget);
-+  metrics = pango_context_get_metrics (context,
-+                                       widget->style->font_desc,
-+                                       pango_context_get_language (context));
-+
-+  height = pango_font_metrics_get_ascent (metrics) +
-+    pango_font_metrics_get_descent (metrics);
-+  
-+  pango_font_metrics_unref (metrics);
-+  
-+  priv->indicator_size = PANGO_PIXELS (height * 0.85);
-+}
-+
-+static void
- gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
- 				   GtkWidget       *widget,
- 				   GdkRectangle    *cell_area,
-@@ -287,6 +312,20 @@
- 
-   priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
- 
-+  if (priv->override_size) {
-+    priv->indicator_size = priv->override_size;
-+  } else if (priv->cached_widget != widget) {
-+    if (priv->cached_widget) {
-+      g_object_remove_weak_pointer (widget, &priv->cached_widget);
-+      g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
-+    }
-+    priv->cached_widget = widget;
-+    g_object_add_weak_pointer (widget, &priv->cached_widget);
-+    g_signal_connect (widget, "style-set", on_widget_style_set, priv);
-+    
-+    on_widget_style_set (widget, NULL, priv);
-+  }
-+
-   calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
-   calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
- 
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch b/poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
deleted file mode 100644
index d0a970a..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+/xsettings.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Pending
-
-Index: gtk+-2.21.2/gdk/x11/gdkevents-x11.c
-===================================================================
---- gtk+-2.21.2.orig/gdk/x11/gdkevents-x11.c	2010-06-22 17:28:04.000000000 +0800
-+++ gtk+-2.21.2/gdk/x11/gdkevents-x11.c	2010-06-22 17:28:06.000000000 +0800
-@@ -3062,10 +3062,9 @@
- {
-   GdkScreenX11 *screen = data;
-   
--  if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
--    return GDK_FILTER_REMOVE;
--  else
--    return GDK_FILTER_CONTINUE;
-+  xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent);
-+
-+  return GDK_FILTER_CONTINUE;
- }
- 
- static Bool
diff --git a/poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb b/poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
deleted file mode 100644
index 682d31e..0000000
--- a/poky/meta/recipes-gnome/gtk+/gtk+_2.24.32.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-require gtk+.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
-                    file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
-                    file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
-           file://xsettings.patch \
-           file://hardcoded_libtool.patch \
-           file://toggle-font.diff;striplevel=0 \
-           file://doc-fixes.patch \
-           file://strict-prototypes.patch \
-           file://0001-Do-not-look-into-HOME-when-looking-for-gtk-modules.patch \
-           "
-
-SRC_URI[md5sum] = "d5742aa42275203a499b59b4c382a784"
-SRC_URI[sha256sum] = "b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e"
-
-EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
-
-LIBV = "2.10.0"
-
-PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
-
-python populate_packages_prepend () {
-    gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
-    immodules_root = os.path.join(gtk_libdir, 'immodules')
-    printmodules_root = os.path.join(gtk_libdir, 'printbackends');
-
-    d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, r'^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
-    do_split_packages(d, printmodules_root, r'^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
-
-    if (d.getVar('DEBIAN_NAMES')):
-        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
-}
diff --git a/poky/meta/recipes-gnome/gtk-doc/files/0001-highlight.py-correctly-set-permissions-on-file-to-be.patch b/poky/meta/recipes-gnome/gtk-doc/files/0001-highlight.py-correctly-set-permissions-on-file-to-be.patch
new file mode 100644
index 0000000..bb8f55c
--- /dev/null
+++ b/poky/meta/recipes-gnome/gtk-doc/files/0001-highlight.py-correctly-set-permissions-on-file-to-be.patch
@@ -0,0 +1,23 @@
+From 63bc4cd1ce2d918c6566a4e0c7d830713432fc82 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 28 Jun 2019 13:08:24 +0200
+Subject: [PATCH] highlight.py: correctly set permissions on file to be written
+
+Upstream-Status: Backport [https://github.com/GNOME/gtk-doc/commit/12d9a698fb58f3d1a840d3bfc0d15a3a9f57afc1]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gtkdoc/highlight.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gtkdoc/highlight.py b/gtkdoc/highlight.py
+index 8f6e470..82e11e8 100644
+--- a/gtkdoc/highlight.py
++++ b/gtkdoc/highlight.py
+@@ -47,6 +47,6 @@ def highlight_code(code, lang='c'):
+ 
+ 
+ def append_style_defs(css_file_name):
+-    os.chmod(css_file_name, stat.S_IWRITE)
++    os.chmod(css_file_name, 0o644)
+     with open(css_file_name, 'at', newline='\n', encoding='utf-8') as css:
+         css.write(HTML_FORMATTER.get_style_defs())
diff --git a/poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch b/poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
index 3e973a1..5674a38 100644
--- a/poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
+++ b/poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
@@ -1,4 +1,4 @@
-From a3f69f2ed45efbdaee47c2dde4df3d78323300e5 Mon Sep 17 00:00:00 2001
+From 31254fac614bb6ee28cf6fdd514a9563a5d781a8 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Mon, 5 Sep 2016 22:25:44 +0100
 Subject: [PATCH] Use native pkg-config when looking for gtk-doc.
diff --git a/poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.30.bb b/poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.30.bb
index f16847e..fce0329 100644
--- a/poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.30.bb
+++ b/poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.30.bb
@@ -24,6 +24,7 @@
            file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
            file://conditionaltests.patch \
            file://no-clobber.patch \
+           file://0001-highlight.py-correctly-set-permissions-on-file-to-be.patch \
            "
 SRC_URI_append_class-native = " file://pkg-config-native.patch"
 
diff --git a/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb b/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb
index 82c137c..1c9084d 100644
--- a/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb
+++ b/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb
@@ -4,7 +4,7 @@
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
 
-DEPENDS = "dbus gtk+3 dbus-glib"
+DEPENDS = "dbus gtk+3 glib-2.0"
 
 inherit gnomebase gtk-doc distro_features_check gobject-introspection
 # depends on gtk+3
diff --git a/poky/meta/recipes-graphics/drm/libdrm_2.4.98.bb b/poky/meta/recipes-graphics/drm/libdrm_2.4.99.bb
similarity index 94%
rename from poky/meta/recipes-graphics/drm/libdrm_2.4.98.bb
rename to poky/meta/recipes-graphics/drm/libdrm_2.4.99.bb
index bed542b..3cb30a4 100644
--- a/poky/meta/recipes-graphics/drm/libdrm_2.4.98.bb
+++ b/poky/meta/recipes-graphics/drm/libdrm_2.4.99.bb
@@ -12,8 +12,8 @@
 
 SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
            file://musl-ioctl.patch"
-SRC_URI[md5sum] = "1320b43c4bdb8846c308ec2610b62b64"
-SRC_URI[sha256sum] = "8be0edccaca3abde8b6bb1431b46354c7fab46e9b91cc6946ba65b51f56f1894"
+SRC_URI[md5sum] = "72539626815b35159a63d45bc4c14ee6"
+SRC_URI[sha256sum] = "4dbf539c7ed25dbb2055090b77ab87508fc46be39a9379d15fed4b5517e1da5e"
 
 inherit meson pkgconfig manpages
 
diff --git a/poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch b/poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
index 2083881..3368f7d 100644
--- a/poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
+++ b/poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
@@ -11,4 +11,4 @@
 +++ freetype-2.6/builds/unix/unix-cc.in	2016-01-07 19:21:50.213112131 +0000
 @@ -19,1 +18,1 @@
 -LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
-+LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@
++LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@ --tag CC
diff --git a/poky/meta/recipes-graphics/freetype/freetype_2.10.0.bb b/poky/meta/recipes-graphics/freetype/freetype_2.10.1.bb
similarity index 85%
rename from poky/meta/recipes-graphics/freetype/freetype_2.10.0.bb
rename to poky/meta/recipes-graphics/freetype/freetype_2.10.1.bb
index 200f43c..b179a0e 100644
--- a/poky/meta/recipes-graphics/freetype/freetype_2.10.0.bb
+++ b/poky/meta/recipes-graphics/freetype/freetype_2.10.1.bb
@@ -12,16 +12,14 @@
                     file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
                     file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
            file://use-right-libtool.patch \
           "
+SRC_URI[md5sum] = "bd42e75127f8431923679480efb5ba8f"
+SRC_URI[sha256sum] = "16dbfa488a21fe827dc27eaf708f42f7aa3bb997d745d31a19781628c36ba26f"
 
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
 UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
 
-SRC_URI[md5sum] = "a717e6925b61b9dda946322ecd278a42"
-SRC_URI[sha256sum] = "fccc62928c65192fff6c98847233b28eb7ce05f12d2fea3f6cc90e8b4e5fbe06"
-
 inherit autotools pkgconfig multilib_header
 
 # Adapt autotools to work with the minimal autoconf usage in freetype
diff --git a/poky/meta/recipes-graphics/libva/libva-utils_2.4.0.bb b/poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb
similarity index 90%
rename from poky/meta/recipes-graphics/libva/libva-utils_2.4.0.bb
rename to poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb
index 7b76431..fc013d7 100644
--- a/poky/meta/recipes-graphics/libva/libva-utils_2.4.0.bb
+++ b/poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb
@@ -18,8 +18,8 @@
            file://0001-Build-sfcsample-only-when-X11-backend-is-enabled.patch \
            "
 
-SRC_URI[md5sum] = "f5374c4c32ce136e50aea0267887aed5"
-SRC_URI[sha256sum] = "5b7d1954b40fcb2c0544be20125c71a0852049715ab85a3e8aba60434a40c6b3"
+SRC_URI[md5sum] = "c1fada26c286654859eff33b2562cb79"
+SRC_URI[sha256sum] = "9238c9d5110d60f935683390b8383fdac3507346384cd5f117a23c6db1d72a17"
 
 UPSTREAM_CHECK_URI = "https://github.com/intel/libva-utils/releases"
 
diff --git a/poky/meta/recipes-graphics/libva/libva_2.4.1.bb b/poky/meta/recipes-graphics/libva/libva_2.5.0.bb
similarity index 92%
rename from poky/meta/recipes-graphics/libva/libva_2.4.1.bb
rename to poky/meta/recipes-graphics/libva/libva_2.5.0.bb
index 525721f..e75648b 100644
--- a/poky/meta/recipes-graphics/libva/libva_2.4.1.bb
+++ b/poky/meta/recipes-graphics/libva/libva_2.5.0.bb
@@ -19,8 +19,8 @@
 
 SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
 
-SRC_URI[md5sum] = "5b5ace9de3f07cb7b8f4d19b6979adf0"
-SRC_URI[sha256sum] = "e9e053908591b121793eaa5d8aa37675b4cd3af4b12f1f377dff4767f39cee70"
+SRC_URI[md5sum] = "3688212fb7a87947070f3729e91ff7cf"
+SRC_URI[sha256sum] = "3aa89cd369a506ac4dbe5de7c0ef5da4f3d220bf986403f02fa1f6f702af6878"
 
 UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
 
diff --git a/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.0.bb b/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb
similarity index 100%
rename from poky/meta/recipes-graphics/mesa/mesa-gl_19.1.0.bb
rename to poky/meta/recipes-graphics/mesa/mesa-gl_19.1.1.bb
diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc
index 3ecfb85..5bbd13b 100644
--- a/poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/poky/meta/recipes-graphics/mesa/mesa.inc
@@ -113,6 +113,9 @@
 export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
 PACKAGECONFIG[xa]  = "-Dgallium-xa=true, -Dgallium-xa=false"
 
+PACKAGECONFIG[lima] = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
+
 OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
 PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
 
diff --git a/poky/meta/recipes-graphics/mesa/mesa_19.1.0.bb b/poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb
similarity index 84%
rename from poky/meta/recipes-graphics/mesa/mesa_19.1.0.bb
rename to poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb
index 05c3153..1a34a65 100644
--- a/poky/meta/recipes-graphics/mesa/mesa_19.1.0.bb
+++ b/poky/meta/recipes-graphics/mesa/mesa_19.1.1.bb
@@ -6,8 +6,8 @@
            file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
            "
 
-SRC_URI[md5sum] = "090cd351cf938fc1729dee983520216a"
-SRC_URI[sha256sum] = "2a6c3af3a803389183168e449c536304cf03e0f82c4c9333077933543b9d02f3"
+SRC_URI[md5sum] = "07cd8cd79de28ec1a374ee3a06e47789"
+SRC_URI[sha256sum] = "72114b16b4a84373b2acda060fe2bb1d45ea2598efab3ef2d44bdeda74f15581"
 
 #because we cannot rely on the fact that all apps will use pkgconfig,
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
diff --git a/poky/meta/recipes-graphics/piglit/piglit_git.bb b/poky/meta/recipes-graphics/piglit/piglit_git.bb
index 4350823..0b6519e 100644
--- a/poky/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -2,13 +2,13 @@
 LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
 
-SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit;protocol=https \
+SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https \
            file://0001-cmake-install-bash-completions-in-the-right-place.patch \
            file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"
 
-SRCREV = "4294b15e3b84a96f24d1286b73d5832eea267bbf"
+SRCREV = "f0e868ac6fbdc295b2955c1b8f73169e7a52f938"
 # (when PV goes above 1.0 remove the trailing r)
 PV = "1.0+gitr${SRCPV}"
 
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
index bf30c98..d2041d7 100644
--- a/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb
@@ -21,7 +21,7 @@
 REQUIRED_DISTRO_FEATURES = 'vulkan'
 
 inherit cmake distro_features_check
-DEPENDS = "vulkan assimp"
+DEPENDS = "vulkan-loader assimp"
 
 do_install_append () {
     # Remove assets that have uncertain licenses
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb b/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb
new file mode 100644
index 0000000..284c19d
--- /dev/null
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Vulkan Header files and API registry"
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=sdk-${PV}"
+
+SRCREV = "097a1045098213919fd56442f52c716fc78eeb27"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+FILES_${PN} += "${datadir}/vulkan"
+
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb b/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb
new file mode 100644
index 0000000..2fd6c44
--- /dev/null
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb
@@ -0,0 +1,37 @@
+SUMMARY = "3D graphics and compute API common loader"
+DESCRIPTION = "Vulkan is a new generation graphics and compute API \
+that provides efficient access to modern GPUs. These packages \
+provide only the common vendor-agnostic library loader, headers and \
+the vulkaninfo utility."
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-${PV}"
+SRCREV = "ecb0b1e69fb2f4d3cae262e6da24c170ce62ae13"
+
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+inherit cmake distro_features_check
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+
+DEPENDS += "vulkan-headers"
+
+EXTRA_OECMAKE = "\
+                 -DBUILD_TESTS=OFF \
+                 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
+                 "
+
+# must choose x11 or wayland or both
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
+RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
+
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb
new file mode 100644
index 0000000..26cdee3
--- /dev/null
+++ b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Vulkan Utilities and Tools"
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-${PV}"
+SRCREV = "3ccd7f6ebae3e1919adf837718c04feb6c2acc61"
+
+S = "${WORKDIR}/git"
+
+inherit cmake distro_features_check
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+DEPENDS += "vulkan-headers vulkan-loader"
+
+EXTRA_OECMAKE = "\
+                 -DBUILD_TESTS=OFF \
+                 -DBUILD_CUBE=OFF \
+                 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
+                 "
+
+# must choose x11 or wayland or both
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch b/poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
deleted file mode 100644
index b0b9fc4..0000000
--- a/poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 9b13be109bc66f4d4a1ad53ce5c92c7c495e41d7 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Tue, 24 Jul 2018 17:40:52 +0300
-Subject: [PATCH] commit f63cbe944107b5cd8f150ceaaec43b26099d5688
-
-Author: Adam Jackson <ajax@redhat.com>
-Date:   Tue Feb 16 10:05:25 2016 -0500
-
-demos: Don't build tri or cube
-
-There are more interesting demos, all we really want here is vulkaninfo.
-This helps because we don't need to pre-build glslang/llvm/lunarglass
-just to get the loader and layers.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- demos/CMakeLists.txt | 88 ----------------------------------------------------
- 1 file changed, 88 deletions(-)
-
-diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
-index 4f32679..26e4cdf 100644
---- a/demos/CMakeLists.txt
-+++ b/demos/CMakeLists.txt
-@@ -93,42 +93,6 @@ elseif(UNIX)
- else()
- endif()
- 
--if(WIN32)
--    # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory.
--    # 32-bit target data goes in build32, and 64-bit target data goes into build.  So, include/link the
--    # appropriate data at build time.
--    if (CMAKE_CL_64)
--        set (BUILDTGT_DIR build)
--    else ()
--        set (BUILDTGT_DIR build32)
--    endif()
--
--    # Use static MSVCRT libraries
--    foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
--                             CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
--        if(${configuration} MATCHES "/MD")
--            string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
--        endif()
--    endforeach()
--
--   file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
--   file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
--endif()
--
--add_custom_command(
--    COMMENT "Compiling cube demo vertex shader"
--    OUTPUT cube.vert.inc
--    COMMAND ${GLSLANG_VALIDATOR} -V -x -o ${CMAKE_CURRENT_BINARY_DIR}/cube.vert.inc ${PROJECT_SOURCE_DIR}/demos/cube.vert
--    MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/demos/cube.vert
--    DEPENDS ${PROJECT_SOURCE_DIR}/demos/cube.vert ${GLSLANG_VALIDATOR}
--)
--add_custom_command(
--    COMMENT "Compiling cube demo fragment shader"
--    OUTPUT cube.frag.inc
--    COMMAND ${GLSLANG_VALIDATOR} -V -x -o ${CMAKE_CURRENT_BINARY_DIR}/cube.frag.inc ${PROJECT_SOURCE_DIR}/demos/cube.frag
--    MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/demos/cube.frag
--    DEPENDS ${PROJECT_SOURCE_DIR}/demos/cube.frag ${GLSLANG_VALIDATOR}
--)
- 
- include_directories(${CMAKE_CURRENT_BINARY_DIR})
- 
-@@ -172,55 +136,3 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-         install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
-     endif()
- endif()
--
--######################################################################################
--# cube
--
--if(APPLE)
--    include(macOS/cube/cube.cmake)
--elseif(NOT WIN32)
--    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
--        add_executable(cube cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
--        target_link_libraries(cube ${LIBRARIES})
--    endif()
--else()
--    if (CMAKE_CL_64)
--        set (LIB_DIR "Win64")
--    else()
--        set (LIB_DIR "Win32")
--    endif()
--
--    add_executable(cube WIN32 cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
--    target_link_libraries(cube ${LIBRARIES})
--endif()
--
--######################################################################################
--# cubepp
--
--if(APPLE)
--    include(macOS/cubepp/cubepp.cmake)
--elseif(NOT WIN32)
--    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
--        add_executable(cubepp cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
--        target_link_libraries(cubepp ${LIBRARIES})
--    endif()
--else()
--    if (CMAKE_CL_64)
--        set (LIB_DIR "Win64")
--    else()
--        set (LIB_DIR "Win32")
--    endif()
--
--    add_executable(cubepp WIN32 cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc)
--    target_link_libraries(cubepp ${LIBRARIES})
--endif()
--
--######################################################################################
--# smoke
--
--if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}))
--    if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR
--        (CMAKE_SYSTEM_NAME STREQUAL "Android") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
--        add_subdirectory(smoke)
--    endif()
--endif()
--- 
-2.4.0
-
diff --git a/poky/meta/recipes-graphics/vulkan/vulkan_1.1.73.0.bb b/poky/meta/recipes-graphics/vulkan/vulkan_1.1.73.0.bb
deleted file mode 100644
index 02e4330..0000000
--- a/poky/meta/recipes-graphics/vulkan/vulkan_1.1.73.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "3D graphics and compute API common loader"
-DESCRIPTION = "Vulkan is a new generation graphics and compute API \
-that provides efficient access to modern GPUs. These packages \
-provide only the common vendor-agnostic library loader, headers and \
-the vulkaninfo utility."
-HOMEPAGE = "https://www.khronos.org/vulkan/"
-BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader"
-SECTION = "libs"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156 \
-                    file://loader/loader.c;endline=25;md5=151b392f46568aaedb4ad22b246237ec"
-SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;nobranch=1 \
-           file://demos-Don-t-build-tri-or-cube.patch \
-           "
-SRCREV = "5998d6f444a85e6381b7a089ebf3f9e86482a31d"
-UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-REQUIRED_DISTRO_FEATURES = "vulkan"
-
-inherit cmake python3native lib_package distro_features_check
-ANY_OF_DISTRO_FEATURES = "x11 wayland"
-
-EXTRA_OECMAKE = "-DBUILD_WSI_MIR_SUPPORT=OFF \
-                 -DBUILD_LAYERS=OFF \
-                 -DBUILD_TESTS=OFF"
-
-# must choose x11 or wayland or both
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}"
-PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr"
-PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
-
-RRECOMMENDS_${PN} = "mesa-vulkan-drivers"
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-# Can't be built with ccache
-CCACHE_DISABLE = "1"
diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb b/poky/meta/recipes-graphics/wayland/libinput_1.13.4.bb
similarity index 86%
rename from poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb
rename to poky/meta/recipes-graphics/wayland/libinput_1.13.4.bb
index 049674c..73d6925 100644
--- a/poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb
+++ b/poky/meta/recipes-graphics/wayland/libinput_1.13.4.bb
@@ -8,8 +8,8 @@
 DEPENDS = "libevdev udev mtdev"
 
 SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz"
-SRC_URI[md5sum] = "8b745894f5d1b2e883bfc686aebadcfe"
-SRC_URI[sha256sum] = "1d9fa0698348dea46f75321d98788f8ac7181c069b70c4d10736910a12bb6a6d"
+SRC_URI[md5sum] = "9ef817774bb5b4006cba95e34103e82c"
+SRC_URI[sha256sum] = "d3eb57c714683b117aae29f6c0be76dd46de259f0a48f20cb43b9fa9f2e1401d"
 
 UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
 
diff --git a/poky/meta/recipes-graphics/xorg-app/xauth_1.0.10.bb b/poky/meta/recipes-graphics/xorg-app/xauth_1.1.bb
similarity index 74%
rename from poky/meta/recipes-graphics/xorg-app/xauth_1.0.10.bb
rename to poky/meta/recipes-graphics/xorg-app/xauth_1.1.bb
index 0e90ffd..24ad960 100644
--- a/poky/meta/recipes-graphics/xorg-app/xauth_1.0.10.bb
+++ b/poky/meta/recipes-graphics/xorg-app/xauth_1.1.bb
@@ -8,8 +8,8 @@
 DEPENDS += "libxau libxext libxmu"
 PE = "1"
 
-SRC_URI[md5sum] = "f3f76cb10f69b571c43893ea6a634aa4"
-SRC_URI[sha256sum] = "5afe42ce3cdf4f60520d1658d2b17face45c74050f39af45dccdc95e73fafc4d"
+SRC_URI[md5sum] = "e50587c1bb832aafd1a19d91a0890a0b"
+SRC_URI[sha256sum] = "6d1dd1b79dd185107c5b0fdd22d1d791ad749ad6e288d0cdf80964c4ffa7530c"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/poky/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb b/poky/meta/recipes-graphics/xorg-app/xinput_1.6.3.bb
similarity index 67%
rename from poky/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb
rename to poky/meta/recipes-graphics/xorg-app/xinput_1.6.3.bb
index 25cd047..ff1f1c9 100644
--- a/poky/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb
+++ b/poky/meta/recipes-graphics/xorg-app/xinput_1.6.3.bb
@@ -8,5 +8,5 @@
 
 DEPENDS += " libxi libxrandr libxinerama"
 
-SRC_URI[md5sum] = "6a889412eff2e3c1c6bb19146f6fe84c"
-SRC_URI[sha256sum] = "3694d29b4180952fbf13c6d4e59541310cbb11eef5bf888ff3d8b7f4e3aee5c4"
+SRC_URI[md5sum] = "ac6b7432726008b2f50eba82b0e2dbe4"
+SRC_URI[sha256sum] = "35a281dd3b9b22ea85e39869bb7670ba78955d5fec17c6ef7165d61e5aeb66ed"
diff --git a/poky/meta/recipes-graphics/xorg-app/xwininfo_1.1.4.bb b/poky/meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb
similarity index 72%
rename from poky/meta/recipes-graphics/xorg-app/xwininfo_1.1.4.bb
rename to poky/meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb
index 1fb90dd..ec9f082 100644
--- a/poky/meta/recipes-graphics/xorg-app/xwininfo_1.1.4.bb
+++ b/poky/meta/recipes-graphics/xorg-app/xwininfo_1.1.5.bb
@@ -11,5 +11,5 @@
 
 PE = "0"
 
-SRC_URI[md5sum] = "9a505b91ae7160bbdec360968d060c83"
-SRC_URI[sha256sum] = "839498aa46b496492a5c65cd42cd2e86e0da88149b0672e90cb91648f8cd5b01"
+SRC_URI[md5sum] = "26d46f7ef0588d3392da3ad5802be420"
+SRC_URI[sha256sum] = "7a405441dfc476666c744f5fcd1bc8a75abf8b5b1d85db7b88b370982365080e"
diff --git a/poky/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch b/poky/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch
index f330c18..ec7c7d8 100644
--- a/poky/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch
+++ b/poky/meta/recipes-graphics/xorg-font/encodings/nocompiler.patch
@@ -1,23 +1,32 @@
+From b08c43a0842076e0a94e88ad6456a9326cd7ffc9 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 17 May 2011 23:03:02 +0000
+Subject: [PATCH] Improve handling of 'all' architecture recipes and their
+
 Upstream-Status: Inappropriate [configuration]
 
 XORG_DEFAULT_OPTIONS pulls in the following dependency chains:
 
 XORG_CWARNFLAGS -> AC_PROG_CC_C99
 XORG_STRICT_OPTION -> AC_PROG_CC_C99, XORG_CWARNFLAGS
-XORG_MANPAGE_SECTIONS -> AC_CANONICAL_HOST -> Checks host 
+XORG_MANPAGE_SECTIONS -> AC_CANONICAL_HOST -> Checks host
 
 each of which triggers the use of the host compiler. As an "all"
 architecture package, it shouldn't need a compiler (and doesn't).
 
 RP 17/5/2011
 
-Index: encodings-1.0.4/configure.ac
-===================================================================
---- encodings-1.0.4.orig/configure.ac	2011-05-17 23:36:19.505095876 +0100
-+++ encodings-1.0.4/configure.ac	2011-05-17 23:54:14.935096128 +0100
-@@ -4,12 +4,12 @@
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 622c27b..5ee84ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,12 +3,12 @@ AC_INIT([encodings], [1.0.5],
+         [https://gitlab.freedesktop.org/xorg/font/encodings/issues])
  AM_INIT_AUTOMAKE([foreign dist-bzip2])
- AM_MAINTAINER_MODE
  
 -# Require xorg-macros: XORG_DEFAULT_OPTIONS
  m4_ifndef([XORG_MACROS_VERSION],
diff --git a/poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb b/poky/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
similarity index 77%
rename from poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
rename to poky/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
index 36766f2..a39609b 100644
--- a/poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
+++ b/poky/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
@@ -13,10 +13,9 @@
 RDEPENDS_${PN} = ""
 
 SRC_URI += "file://nocompiler.patch"
+SRC_URI[md5sum] = "bbae4f247b88ccde0e85ed6a403da22a"
+SRC_URI[sha256sum] = "bd96e16143a044b19e87f217cf6a3763a70c561d1076aad6f6d862ec41774a31"
 
 inherit allarch
 
 EXTRA_OECONF += "--with-encodingsdir=${datadir}/fonts/X11/encodings"
-
-SRC_URI[md5sum] = "0f2d6546d514c5cc4ecf78a60657a5c1"
-SRC_URI[sha256sum] = "ced6312988a45d23812c2ac708b4595f63fd7a49c4dcd9f66bdcd50d1057d539"
diff --git a/poky/meta/recipes-graphics/xorg-lib/libice/CVE-2017-2626.patch b/poky/meta/recipes-graphics/xorg-lib/libice/CVE-2017-2626.patch
deleted file mode 100644
index 20c6dda..0000000
--- a/poky/meta/recipes-graphics/xorg-lib/libice/CVE-2017-2626.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From ff5e59f32255913bb1cdf51441b98c9107ae165b Mon Sep 17 00:00:00 2001
-From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
-Date: Tue, 4 Apr 2017 19:12:53 +0200
-Subject: Use getentropy() if arc4random_buf() is not available
-
-This allows to fix CVE-2017-2626 on Linux platforms without pulling in
-libbsd.
-The libc getentropy() is available since glibc 2.25 but also on OpenBSD.
-For Linux, we need at least a v3.17 kernel. If the recommended
-arc4random_buf() function is not available, emulate it by first trying
-to use getentropy() on a supported glibc and kernel. If the call fails,
-fall back to the current (partly vulnerable) code.
-
-Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
-Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
-Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
-Upstream-Status: Backport[https://cgit.freedesktop.org/xorg/lib/libICE
-                 /commit/?id=ff5e59f32255913bb1cdf51441b98c9107ae165b]
-
-CVE: CVE-2017-2626
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- configure.ac  |  2 +-
- src/iceauth.c | 65 ++++++++++++++++++++++++++++++++++++++++++-----------------
- 2 files changed, 47 insertions(+), 20 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 458882a..c971ab6 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -38,7 +38,7 @@ AC_DEFINE(ICE_t, 1, [Xtrans transport type])
- 
- # Checks for library functions.
- AC_CHECK_LIB([bsd], [arc4random_buf])
--AC_CHECK_FUNCS([asprintf arc4random_buf])
-+AC_CHECK_FUNCS([asprintf arc4random_buf getentropy])
- 
- # Allow checking code with lint, sparse, etc.
- XORG_WITH_LINT
-diff --git a/src/iceauth.c b/src/iceauth.c
-index ed31683..de4785b 100644
---- a/src/iceauth.c
-+++ b/src/iceauth.c
-@@ -44,31 +44,19 @@ Author: Ralph Mor, X Consortium
- 
- static int was_called_state;
- 
--/*
-- * MIT-MAGIC-COOKIE-1 is a sample authentication method implemented by
-- * the SI.  It is not part of standard ICElib.
-- */
-+#ifndef HAVE_ARC4RANDOM_BUF
- 
--
--char *
--IceGenerateMagicCookie (
-+static void
-+emulate_getrandom_buf (
-+	char *auth,
- 	int len
- )
- {
--    char    *auth;
--#ifndef HAVE_ARC4RANDOM_BUF
-     long    ldata[2];
-     int	    seed;
-     int	    value;
-     int	    i;
--#endif
- 
--    if ((auth = malloc (len + 1)) == NULL)
--	return (NULL);
--
--#ifdef HAVE_ARC4RANDOM_BUF
--    arc4random_buf(auth, len);
--#else
- #ifdef ITIMER_REAL
-     {
- 	struct timeval  now;
-@@ -76,13 +64,13 @@ IceGenerateMagicCookie (
- 	ldata[0] = now.tv_sec;
- 	ldata[1] = now.tv_usec;
-     }
--#else
-+#else /* ITIMER_REAL */
-     {
- 	long    time ();
- 	ldata[0] = time ((long *) 0);
- 	ldata[1] = getpid ();
-     }
--#endif
-+#endif /* ITIMER_REAL */
-     seed = (ldata[0]) + (ldata[1] << 16);
-     srand (seed);
-     for (i = 0; i < len; i++)
-@@ -90,7 +78,46 @@ IceGenerateMagicCookie (
- 	value = rand ();
- 	auth[i] = value & 0xff;
-     }
--#endif
-+}
-+
-+static void
-+arc4random_buf (
-+	char *auth,
-+	int len
-+)
-+{
-+    int	    ret;
-+
-+#if HAVE_GETENTROPY
-+    /* weak emulation of arc4random through the entropy libc */
-+    ret = getentropy (auth, len);
-+    if (ret == 0)
-+	return;
-+#endif /* HAVE_GETENTROPY */
-+
-+    emulate_getrandom_buf (auth, len);
-+}
-+
-+#endif /* !defined(HAVE_ARC4RANDOM_BUF) */
-+
-+/*
-+ * MIT-MAGIC-COOKIE-1 is a sample authentication method implemented by
-+ * the SI.  It is not part of standard ICElib.
-+ */
-+
-+
-+char *
-+IceGenerateMagicCookie (
-+	int len
-+)
-+{
-+    char    *auth;
-+
-+    if ((auth = malloc (len + 1)) == NULL)
-+	return (NULL);
-+
-+    arc4random_buf (auth, len);
-+
-     auth[len] = '\0';
-     return (auth);
- }
--- 
-cgit v1.1
-
diff --git a/poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb b/poky/meta/recipes-graphics/xorg-lib/libice_1.0.10.bb
similarity index 81%
rename from poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
rename to poky/meta/recipes-graphics/xorg-lib/libice_1.0.10.bb
index c1b1913..6a6316f 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/libice_1.0.10.bb
@@ -20,10 +20,8 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[md5sum] = "addfb1e897ca8079531669c7c7711726"
-SRC_URI[sha256sum] = "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
-
-SRC_URI += "file://CVE-2017-2626.patch"
+SRC_URI[md5sum] = "76d77499ee7120a56566891ca2c0dbcf"
+SRC_URI[sha256sum] = "6f86dce12cf4bcaf5c37dddd8b1b64ed2ddf1ef7b218f22b9942595fb747c348"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
diff --git a/poky/meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch b/poky/meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch
deleted file mode 100644
index f532858..0000000
--- a/poky/meta/recipes-graphics/xorg-lib/libpciaccess/0004-Don-t-include-sys-io.h-on-arm.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b6df5202306bd71158b482f25ca2e6919645d4dd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 4 Jun 2015 20:55:06 -0700
-Subject: [PATCH 4/4] Don't include sys/io.h on arm
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/linux_sysfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
-index 3f95e53..1e3aad3 100644
---- a/src/linux_sysfs.c
-+++ b/src/linux_sysfs.c
-@@ -50,7 +50,7 @@
- #include <dirent.h>
- #include <errno.h>
- 
--#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
-+#if defined(__i386__) || defined(__x86_64__)
- #include <sys/io.h>
- #else
- #define inb(x) -1
--- 
-2.1.4
-
diff --git a/poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb b/poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb
similarity index 65%
rename from poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb
rename to poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb
index d030c31..b58cb80 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.14.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/libpciaccess_0.16.bb
@@ -6,11 +6,10 @@
 require xorg-lib-common.inc
 
 SRC_URI += "\
-            file://0004-Don-t-include-sys-io.h-on-arm.patch \
 "
 
-SRC_URI[md5sum] = "8f436e151d5106a9cfaa71857a066d33"
-SRC_URI[sha256sum] = "3df543e12afd41fea8eac817e48cbfde5aed8817b81670a4e9e493bb2f5bf2a4"
+SRC_URI[md5sum] = "b34e2cbdd6aa8f9cc3fa613fd401a6d6"
+SRC_URI[sha256sum] = "214c9d0d884fdd7375ec8da8dcb91a8d3169f263294c9a90c575bf1938b9f489"
 
 LICENSE = "MIT & MIT-style"
 LIC_FILES_CHKSUM = "file://COPYING;md5=277aada5222b9a22fbf3471ff3687068"
diff --git a/poky/meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb b/poky/meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb
similarity index 81%
rename from poky/meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb
rename to poky/meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb
index ab49cdb..5a08e07 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/libxi_1.7.10.bb
@@ -17,8 +17,7 @@
 
 XORG_PN = "libXi"
 
-SRC_URI[md5sum] = "1f0f2719c020655a60aee334ddd26d67"
-SRC_URI[sha256sum] = "c2e6b8ff84f9448386c1b5510a5cf5a16d788f76db018194dacdc200180faf45"
+SRC_URI[md5sum] = "62c4af0839072024b4b1c8cbe84216c7"
+SRC_URI[sha256sum] = "36a30d8f6383a72e7ce060298b4b181fd298bc3a135c8e201b7ca847f5f81061"
 
 BBCLASSEXTEND = "native nativesdk"
-
diff --git a/poky/meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch b/poky/meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch
deleted file mode 100644
index 1a691a3..0000000
--- a/poky/meta/recipes-graphics/xorg-lib/libxt/0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b0c0e6d90bd99a699701c9542640adb218f5d536 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Mon, 10 Jul 2017 16:51:13 +0300
-Subject: [PATCH] libXt: util: don't link makestrs with target cflags
-
-The line: AM_CFLAGS = $(XT_CFLAGS)
-in util/Makefile.am is wrong because it adds target cflags to the
-compilation of makestrs, which is built for the build machine, which
-leads to build failures when cross-compiling.
-
-Upstream-Status: Pending
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- util/Makefile.am | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/util/Makefile.am b/util/Makefile.am
-index 800b35b..f2dd1f9 100644
---- a/util/Makefile.am
-+++ b/util/Makefile.am
-@@ -11,7 +11,6 @@ EXTRA_DIST = \
- 	StrDefs.ht \
- 	string.list
- 
--AM_CFLAGS = $(XT_CFLAGS)
- makestrs_SOURCES = makestrs.c
- 
- 
--- 
-2.4.0
-
diff --git a/poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch b/poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
index ffc2c15..ff8c675 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
+++ b/poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
@@ -1,3 +1,8 @@
+From f069b0a430fe96f3ece2106d34375008833599d3 Mon Sep 17 00:00:00 2001
+From: Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: Fri, 2 Dec 2011 12:20:05 -0800
+Subject: [PATCH] libxt: fix compilatoin with x32 toolchain
+
 Upstream-Status: Pending
 
 This fixes compilation with x32 toolchain.
@@ -5,10 +10,15 @@
 Received this patch from H.J. Lu <hjl.tools@gmail.com>
 Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
 
+---
+ include/X11/Xtos.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
---- libXt-1.1.1/include/X11/Xtos.h.x32	2011-02-08 07:56:40.000000000 -0800
-+++ libXt-1.1.1/include/X11/Xtos.h	2011-11-30 17:19:27.473349770 -0800
-@@ -62,7 +62,7 @@ SOFTWARE.
+diff --git a/include/X11/Xtos.h b/include/X11/Xtos.h
+index 64b2da8..44f52c2 100644
+--- a/include/X11/Xtos.h
++++ b/include/X11/Xtos.h
+@@ -59,7 +59,7 @@ SOFTWARE.
      defined(__sparc64__) || \
      defined(__s390x__) || \
      (defined(__hppa__) && defined(__LP64__)) || \
diff --git a/poky/meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb b/poky/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
similarity index 76%
rename from poky/meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb
rename to poky/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
index 23d9db4..42df435 100644
--- a/poky/meta/recipes-graphics/xorg-lib/libxt_1.1.5.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
@@ -13,8 +13,7 @@
 require xorg-lib-common.inc
 
 LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6565b1e0094ea1caae0971cc4035f343"
-
+LIC_FILES_CHKSUM = "file://COPYING;md5=73d55cea4d27ca1a09a5d23378b3ecf8"
 
 DEPENDS += "util-linux libxcb libsm virtual/libx11 xorgproto libxdmcp"
 PROVIDES = "xt"
@@ -24,12 +23,10 @@
 XORG_PN = "libXt"
 
 SRC_URI +=  "file://libxt_fix_for_x32.patch \
-             file://0001-libXt-util-don-t-link-makestrs-with-target-cflags.patch \
             "
+SRC_URI[md5sum] = "a9019421d3ee8b4937b6afd9025f018a"
+SRC_URI[sha256sum] = "b31df531dabed9f4611fc8980bc51d7782967e2aff44c4105251a1acb5a77831"
 
 BBCLASSEXTEND = "native nativesdk"
 
 EXTRA_OECONF += "--disable-xkb"
-
-SRC_URI[md5sum] = "8f5b5576fbabba29a05f3ca2226f74d3"
-SRC_URI[sha256sum] = "46eeb6be780211fdd98c5109286618f6707712235fdd19df4ce1e6954f349f1a"
diff --git a/poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.27.bb b/poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.27.bb
index a6b2cc0..02156ad 100644
--- a/poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.27.bb
+++ b/poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.27.bb
@@ -13,12 +13,11 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
 
 SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-
 SRC_URI[md5sum] = "316753e35d3906d042c74230612eab9f"
 SRC_URI[sha256sum] = "690daec8fea63526c07620c90e6f3f10aae34e94b6db6e30906173480721901f"
 
 SECTION = "x11/libs"
-DEPENDS = "intltool-native util-macros libxslt-native"
+DEPENDS = "util-macros libxslt-native"
 
 EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
 
diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190618.bb
similarity index 99%
rename from poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
rename to poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190618.bb
index 8b6ad96..acaca95 100644
--- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190618.bb
@@ -92,7 +92,7 @@
                     file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \
                     file://LICENCE.iwlwifi_firmware;md5=3fd842911ea93c29cd32679aa23e1c88 \
                     file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \
-                    file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
+                    file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \
                     file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \
                     file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
                     file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
@@ -123,7 +123,7 @@
                     file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
                     file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
                     file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
-                    file://WHENCE;md5=b6e44adf71bc37e5f26ebfe5a08b5490 \
+                    file://WHENCE;md5=55814698bbae7c7dd40c9fbde91af0a8 \
                     "
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -190,9 +190,7 @@
 NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
 NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
 
-SRCREV = "711d3297bac870af42088a467459a0634c1970ca"
-PE = "1"
-PV = "0.0+git${SRCPV}"
+SRCREV = "0731d06eadc7d9c52e58f354727101813b8da6ea"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
index a4facfe..9715241 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb
@@ -11,13 +11,13 @@
         raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "4dbcaca4c9ff89e866d2b5d01df005f317c618a4"
-SRCREV_meta ?= "ad235db461bf4595c668700ca8a909c322009cc1"
+SRCREV_machine ?= "dac3a011d5832c5f94ffac569559f05014746f01"
+SRCREV_meta ?= "772b96e00bb4d0dc4d2a18d2f7da7d5df53bf368"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "4.19.44"
+LINUX_VERSION ?= "4.19.57"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
index 8bd9d74..9e822f2 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb
@@ -12,7 +12,7 @@
 }
 
 SRCREV_machine ?= "9c1e84c9b81b6bf1df55f26f2e0517266c37f7eb"
-SRCREV_meta ?= "31de88e51d100f2c3eefb7acb7390b0144bcfc69"
+SRCREV_meta ?= "c2e34d9ab2894edc6abc6be9ac89907bf4348447"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
index e668854..6d42cfa 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb
@@ -6,7 +6,7 @@
 
 require recipes-kernel/linux/linux-yocto.inc
 
-LINUX_VERSION ?= "4.19.44"
+LINUX_VERSION ?= "4.19.57"
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine_qemuarm ?= "a3cd9d732b27e78f94634924b7232b6280dae002"
-SRCREV_machine ?= "f0c6c85e155632580bd44a5db01cbb19dcc1559c"
-SRCREV_meta ?= "ad235db461bf4595c668700ca8a909c322009cc1"
+SRCREV_machine_qemuarm ?= "36a736baed7fedb11c7c39b3e8d06e165e9e4d06"
+SRCREV_machine ?= "b1d253af9cdeb237b4875ca6184c0cbdfbe65e70"
+SRCREV_meta ?= "772b96e00bb4d0dc4d2a18d2f7da7d5df53bf368"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
index 226a90c..a171965 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb
@@ -17,7 +17,7 @@
 
 SRCREV_machine_qemuarm ?= "fabee455f397ba8054f35a3ad5f2250bbad93bef"
 SRCREV_machine ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
-SRCREV_meta ?= "31de88e51d100f2c3eefb7acb7390b0144bcfc69"
+SRCREV_meta ?= "c2e34d9ab2894edc6abc6be9ac89907bf4348447"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb
index 014d689..c284bef 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb
@@ -11,22 +11,22 @@
 KBRANCH_qemux86-64 ?= "v4.19/standard/base"
 KBRANCH_qemumips64 ?= "v4.19/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "c12bc1a098be009c44582e75af630ff573155473"
-SRCREV_machine_qemuarm64 ?= "f0c6c85e155632580bd44a5db01cbb19dcc1559c"
-SRCREV_machine_qemumips ?= "18ba7160ac7a094bf9659649c537303201eb022e"
-SRCREV_machine_qemuppc ?= "f0c6c85e155632580bd44a5db01cbb19dcc1559c"
-SRCREV_machine_qemux86 ?= "f0c6c85e155632580bd44a5db01cbb19dcc1559c"
-SRCREV_machine_qemux86-64 ?= "f0c6c85e155632580bd44a5db01cbb19dcc1559c"
-SRCREV_machine_qemumips64 ?= "d9c77fe2a6038848fbadd660882b78e590c3252e"
-SRCREV_machine ?= "f0c6c85e155632580bd44a5db01cbb19dcc1559c"
-SRCREV_meta ?= "ad235db461bf4595c668700ca8a909c322009cc1"
+SRCREV_machine_qemuarm ?= "c093532d256a8c46a4e73a940998ddec916f63be"
+SRCREV_machine_qemuarm64 ?= "b1d253af9cdeb237b4875ca6184c0cbdfbe65e70"
+SRCREV_machine_qemumips ?= "8bac53c36a72ab7dc343f754a76094c41c633c77"
+SRCREV_machine_qemuppc ?= "b1d253af9cdeb237b4875ca6184c0cbdfbe65e70"
+SRCREV_machine_qemux86 ?= "b1d253af9cdeb237b4875ca6184c0cbdfbe65e70"
+SRCREV_machine_qemux86-64 ?= "b1d253af9cdeb237b4875ca6184c0cbdfbe65e70"
+SRCREV_machine_qemumips64 ?= "bbc2fcd94ccdb48977a7bf3fcbbc56ef785a0bd1"
+SRCREV_machine ?= "b1d253af9cdeb237b4875ca6184c0cbdfbe65e70"
+SRCREV_meta ?= "772b96e00bb4d0dc4d2a18d2f7da7d5df53bf368"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA} \
           "
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION ?= "4.19.44"
+LINUX_VERSION ?= "4.19.57"
 
 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
 DEPENDS += "openssl-native util-linux-native"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb
index 7456141..0e4a372 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.0.bb
@@ -21,7 +21,7 @@
 SRCREV_machine_qemux86-64 ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
 SRCREV_machine_qemumips64 ?= "5a8b27bcc0b16077ab8edfcd3fb25c80dc2c652e"
 SRCREV_machine ?= "00638cdd8f92869a0f89ebe3289fdbd856ba9458"
-SRCREV_meta ?= "31de88e51d100f2c3eefb7acb7390b0144bcfc69"
+SRCREV_meta ?= "c2e34d9ab2894edc6abc6be9ac89907bf4348447"
 
 # remap qemuarm to qemuarma15 for the 5.0 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
diff --git a/poky/meta/recipes-kernel/lttng/babeltrace_1.5.6.bb b/poky/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
similarity index 93%
rename from poky/meta/recipes-kernel/lttng/babeltrace_1.5.6.bb
rename to poky/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
index f5c31c4..05ef6d0 100644
--- a/poky/meta/recipes-kernel/lttng/babeltrace_1.5.6.bb
+++ b/poky/meta/recipes-kernel/lttng/babeltrace_1.5.7.bb
@@ -8,7 +8,7 @@
 DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
 
 SRC_URI = "git://git.linuxfoundation.org/diamon/babeltrace.git;branch=stable-1.5"
-SRCREV = "4f10a4adabee5ca61c27ba399b3438505e0cd6de"
+SRCREV = "d4014aeef4b89a4aaab1af42d7b0d143d62da0ff"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)$"
 
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb b/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb
index e1b50fa..c1f4acd 100644
--- a/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb
+++ b/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb
@@ -22,7 +22,6 @@
 # Remember on upgrades to check that no new tools have been added.
 PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \
                    sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \
-                   ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'echomixer envy24control rmedigicontrol', '', d)} \
                    ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \
                    "
 
diff --git a/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.1.3.bb b/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.1.4.bb
similarity index 95%
rename from poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.1.3.bb
rename to poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.1.4.bb
index 147388d..884973d 100644
--- a/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.1.3.bb
+++ b/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.1.4.bb
@@ -26,8 +26,8 @@
 SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
            file://mips64_cpu_detection.patch \
            "
-SRC_URI[md5sum] = "dcc20dd2682ea01c678b7b8324339d43"
-SRC_URI[sha256sum] = "0c3020452880581a8face91595b239198078645e7d7184273b8bcc7758beb63d"
+SRC_URI[md5sum] = "5307931aeb7aaee5e1509d9996040661"
+SRC_URI[sha256sum] = "f1f049a82fcfbf156564e73a3935d7e750891fab2abf302e735104fd4050a7e1"
 
 # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
 ARM_INSTRUCTION_SET_armv4 = "arm"
@@ -44,7 +44,7 @@
 
 PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \
                    bzlib gpl lzma theora x264 \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}"
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
 
 # libraries to build in addition to avutil
 PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
@@ -73,6 +73,7 @@
 PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
 PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
 PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
 PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
 
 # Check codecs that require --enable-nonfree
@@ -89,10 +90,6 @@
     --enable-pic \
     --enable-shared \
     --enable-pthreads \
-    --disable-libxcb \
-    --disable-libxcb-shm \
-    --disable-libxcb-xfixes \
-    --disable-libxcb-shape \
     ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
     \
     --cross-prefix=${TARGET_PREFIX} \
@@ -106,7 +103,6 @@
     --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
     --extra-ldflags="${TARGET_LDFLAGS}" \
     --sysroot="${STAGING_DIR_TARGET}" \
-    --enable-hardcoded-tables \
     ${EXTRA_FFCONF} \
     --libdir=${libdir} \
     --shlibdir=${libdir} \
diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.0.bb
index f676b1f..f9289e9 100644
--- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.0.bb
+++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.0.bb
@@ -19,7 +19,7 @@
 
 DEPENDS += "gstreamer1.0-plugins-base"
 
-inherit gettext bluetooth gobject-introspection
+inherit gettext gobject-introspection
 
 PACKAGECONFIG ??= " \
     ${GSTREAMER_ORC} \
@@ -35,7 +35,7 @@
 # not add GL dependencies here, since these are taken care of in -base.
 
 PACKAGECONFIG[assrender]       = "--enable-assrender,--disable-assrender,libass"
-PACKAGECONFIG[bluez]           = "--enable-bluez,--disable-bluez,${BLUEZ}"
+PACKAGECONFIG[bluez]           = "--enable-bluez,--disable-bluez,bluez5"
 PACKAGECONFIG[bz2]             = "--enable-bz2,--disable-bz2,bzip2"
 PACKAGECONFIG[curl]            = "--enable-curl,--disable-curl,curl"
 PACKAGECONFIG[dash]            = "--enable-dash,--disable-dash,libxml2"
@@ -77,7 +77,7 @@
 PACKAGECONFIG[uvch264]         = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
 PACKAGECONFIG[voaacenc]        = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
 PACKAGECONFIG[voamrwbenc]      = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
-PACKAGECONFIG[vulkan]          = "--enable-vulkan,--disable-vulkan,vulkan"
+PACKAGECONFIG[vulkan]          = "--enable-vulkan,--disable-vulkan,vulkan-loader"
 PACKAGECONFIG[wayland]         = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
 PACKAGECONFIG[webp]            = "--enable-webp,--disable-webp,libwebp"
 PACKAGECONFIG[webrtc]          = "--enable-webrtc,--disable-webrtc,libnice"
diff --git a/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch b/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch
index 8d09ce7..10e0890 100644
--- a/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch
+++ b/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch
@@ -6,6 +6,7 @@
 Upstream-Status: Pending
 
 CVE: CVE-2004-2779
+CVE: CVE-2017-11551
 
 Signed-off-by: Changqing Li <changqing.li@windriver.com>
 
diff --git a/poky/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch b/poky/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch
new file mode 100644
index 0000000..f0867b5
--- /dev/null
+++ b/poky/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch
@@ -0,0 +1,39 @@
+In case of an unknown/invalid encoding, id3_parse_string() will
+return NULL, but the return value wasn't checked resulting
+in segfault in id3_ucs4_length().  This is the only place
+the return value wasn't checked.
+
+Patch taken from Debian:
+https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/
+
+CVE: CVE-2017-11550
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf
+--- libid3tag-0.15.1b~/compat.gperf	2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/compat.gperf	2007-01-14 14:36:53.000000000 +0000
+@@ -236,6 +236,10 @@
+ 
+     encoding = id3_parse_uint(&data, 1);
+     string   = id3_parse_string(&data, end - data, encoding, 0);
++    if (!string)
++    {
++	continue;
++    }
+ 
+     if (id3_ucs4_length(string) < 4) {
+       free(string);
+diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c
+--- libid3tag-0.15.1b~/parse.c	2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/parse.c	2007-01-14 14:37:34.000000000 +0000
+@@ -165,6 +165,9 @@
+   case ID3_FIELD_TEXTENCODING_UTF_8:
+     ucs4 = id3_utf8_deserialize(ptr, length);
+     break;
++  default:
++  	/* FIXME: Unknown encoding! Print warning? */
++	return NULL;
+   }
+ 
+   if (ucs4 && !full) {
diff --git a/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
index 43edd3f..0312a61 100644
--- a/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
+++ b/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
@@ -14,6 +14,7 @@
            file://obsolete_automake_macros.patch \
            file://0001-Fix-gperf-3.1-incompatibility.patch \
            file://10_utf16.patch \
+           file://unknown-encoding.patch \
            "
 UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/"
 UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$"
diff --git a/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
index 77393db..ffb4585 100644
--- a/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
+++ b/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Audio format Conversion library"
 HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
 AUTHOR = "Erik de Castro Lopo"
-DEPENDS = "flac libogg libvorbis sqlite3"
+DEPENDS = "flac libogg libvorbis"
 SECTION = "libs/multimedia"
 LICENSE = "LGPLv2.1"
 
@@ -30,11 +30,6 @@
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
 PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
 
 inherit autotools lib_package pkgconfig
-
-do_configure_prepend_arm() {
-	export ac_cv_sys_largefile_source=1
-	export ac_cv_sys_file_offset_bits=64
-}
-
diff --git a/poky/meta/recipes-multimedia/libtiff/files/libtool2.patch b/poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
deleted file mode 100644
index 96233b4..0000000
--- a/poky/meta/recipes-multimedia/libtiff/files/libtool2.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 5b893206e0a0d529ba2d0caf58cfffc03bccb598 Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <hrw@openedhand.com>
-Date: Sat, 14 Jun 2008 13:42:22 +0000
-Subject: [PATCH] tiff: make it work after libtool upgrade
-
-Upstream-Status: Inappropriate [configuration]
-
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index c7b02e2..ae1c964 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,7 +27,7 @@ dnl Process this file with autoconf to produce a configure script.
- AC_PREREQ(2.64)
- AC_INIT([LibTIFF Software],[4.0.10],[tiff@lists.maptools.org],[tiff])
- AC_CONFIG_AUX_DIR(config)
--AC_CONFIG_MACRO_DIR(m4)
-+dnl AC_CONFIG_MACRO_DIR(m4)
- AC_LANG(C)
- 
- dnl Compute the canonical host (run-time) system type variable
diff --git a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch
new file mode 100644
index 0000000..6f1fd4d
--- /dev/null
+++ b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch
@@ -0,0 +1,52 @@
+CVE: CVE-2019-6128
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 0c74a9f49b8d7a36b17b54a7428b3526d20f88a8 Mon Sep 17 00:00:00 2001
+From: Scott Gayou <github.scott@gmail.com>
+Date: Wed, 23 Jan 2019 15:03:53 -0500
+Subject: [PATCH] Fix for simple memory leak that was assigned CVE-2019-6128.
+
+pal2rgb failed to free memory on a few errors. This was reported
+here: http://bugzilla.maptools.org/show_bug.cgi?id=2836.
+---
+ tools/pal2rgb.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
+index 01d8502ec..9492f1cf1 100644
+--- a/tools/pal2rgb.c
++++ b/tools/pal2rgb.c
+@@ -118,12 +118,14 @@ main(int argc, char* argv[])
+ 	    shortv != PHOTOMETRIC_PALETTE) {
+ 		fprintf(stderr, "%s: Expecting a palette image.\n",
+ 		    argv[optind]);
++		(void) TIFFClose(in);
+ 		return (-1);
+ 	}
+ 	if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
+ 		fprintf(stderr,
+ 		    "%s: No colormap (not a valid palette image).\n",
+ 		    argv[optind]);
++		(void) TIFFClose(in);
+ 		return (-1);
+ 	}
+ 	bitspersample = 0;
+@@ -131,11 +133,14 @@ main(int argc, char* argv[])
+ 	if (bitspersample != 8) {
+ 		fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n",
+ 		    argv[optind]);
++		(void) TIFFClose(in);
+ 		return (-1);
+ 	}
+ 	out = TIFFOpen(argv[optind+1], "w");
+-	if (out == NULL)
++	if (out == NULL) {
++		(void) TIFFClose(in);
+ 		return (-2);
++	}
+ 	cpTags(in, out);
+ 	TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth);
+ 	TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
+-- 
+2.21.0
diff --git a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch
new file mode 100644
index 0000000..f244fb2
--- /dev/null
+++ b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch
@@ -0,0 +1,77 @@
+CVE: CVE-2019-7663
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From c6fc6c1fa895024c86285c58efd6424cf8078f32 Mon Sep 17 00:00:00 2001
+From: Thomas Bernard <miniupnp@free.fr>
+Date: Mon, 11 Feb 2019 10:05:33 +0100
+Subject: [PATCH 1/2] check that (Tile Width)*(Samples/Pixel) do no overflow
+
+fixes bug 2833
+---
+ tools/tiffcp.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/tools/tiffcp.c b/tools/tiffcp.c
+index 2f406e2d..f0ee2c02 100644
+--- a/tools/tiffcp.c
++++ b/tools/tiffcp.c
+@@ -1408,7 +1408,7 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
+ 	int status = 1;
+ 	uint32 imagew = TIFFRasterScanlineSize(in);
+ 	uint32 tilew = TIFFTileRowSize(in);
+-	int iskew  = imagew - tilew*spp;
++	int iskew;
+ 	tsize_t tilesize = TIFFTileSize(in);
+ 	tdata_t tilebuf;
+ 	uint8* bufp = (uint8*) buf;
+@@ -1416,6 +1416,12 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
+ 	uint32 row;
+ 	uint16 bps = 0, bytes_per_sample;
+ 
++	if (spp > (0x7fffffff / tilew))
++	{
++		TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)");
++		return 0;
++	}
++	iskew = imagew - tilew*spp;
+ 	tilebuf = _TIFFmalloc(tilesize);
+ 	if (tilebuf == 0)
+ 		return 0;
+-- 
+2.20.1
+
+
+From da6454aa80b9bb3154dfab4e8b21637de47531e0 Mon Sep 17 00:00:00 2001
+From: Thomas Bernard <miniupnp@free.fr>
+Date: Mon, 11 Feb 2019 21:42:03 +0100
+Subject: [PATCH 2/2] tiffcp.c: use INT_MAX
+
+---
+ tools/tiffcp.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tools/tiffcp.c b/tools/tiffcp.c
+index f0ee2c02..8c81aa4f 100644
+--- a/tools/tiffcp.c
++++ b/tools/tiffcp.c
+@@ -41,6 +41,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <limits.h>
+ 
+ #include <ctype.h>
+ 
+@@ -1416,7 +1417,7 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer)
+ 	uint32 row;
+ 	uint16 bps = 0, bytes_per_sample;
+ 
+-	if (spp > (0x7fffffff / tilew))
++	if (spp > (INT_MAX / tilew))
+ 	{
+ 		TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)");
+ 		return 0;
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb b/poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb
index 152fa81..9994962 100644
--- a/poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb
+++ b/poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb
@@ -5,9 +5,8 @@
 CVE_PRODUCT = "libtiff"
 
 SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
-           file://libtool2.patch \
-           "
-
+           file://CVE-2019-6128.patch \
+           file://CVE-2019-7663.patch"
 SRC_URI[md5sum] = "114192d7ebe537912a2b97408832e7fd"
 SRC_URI[sha256sum] = "2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4"
 
diff --git a/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch b/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch
new file mode 100644
index 0000000..b2544cb
--- /dev/null
+++ b/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch
@@ -0,0 +1,156 @@
+From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001
+From: Jan Schmidt <thaytan@noraisin.net>
+Date: Sun, 10 Nov 2013 00:49:52 +1100
+Subject: [PATCH] Import revision 1206 from upstream to fix PIE build.
+
+Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm
+in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad
+for shared libraries.  Some environments demand that .text actually be
+read-only all the time, yet MC_put_o_16_arm etc require that the addresses
+be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.)
+Even in those environments which permit the dynamic linker to modify the
+.text segment, the runtime cost of doing the relocation can be noticeable.
+
+This commit rewrites the linkage, discarding the tables of addresses
+in favor of tables of offsets.  All transfers are local within each individual
+function, so there can be no interference by processing that occurs
+after assembly, such as link-time re-ordering (even of individual functions.)
+
+Patch by John Reiser <jreiser@bitwagon.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499]
+---
+ libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++-------------------
+ 1 file changed, 33 insertions(+), 37 deletions(-)
+
+diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
+index c921f7c..82143f8 100644
+--- a/libmpeg2/motion_comp_arm_s.S
++++ b/libmpeg2/motion_comp_arm_s.S
+@@ -30,9 +30,13 @@ MC_put_o_16_arm:
+ 	pld [r1]
+         stmfd sp!, {r4-r11, lr} @ R14 is also called LR
+ 	and r4, r1, #3
+-	adr r5, MC_put_o_16_arm_align_jt
+-	add r5, r5, r4, lsl #2
+-	ldr pc, [r5]
++	ldrb r4, [pc, r4]
++	add pc, pc, r4, lsl #2
++	.byte (MC_put_o_16_arm_align0 - 0f)>>2
++	.byte (MC_put_o_16_arm_align1 - 0f)>>2
++	.byte (MC_put_o_16_arm_align2 - 0f)>>2
++	.byte (MC_put_o_16_arm_align3 - 0f)>>2
++0:
+ 
+ MC_put_o_16_arm_align0:
+ 	ldmia r1, {r4-r7}
+@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3:
+ 1:	PROC(24)
+ 	bne 1b
+         ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
+-MC_put_o_16_arm_align_jt:
+-	.word MC_put_o_16_arm_align0
+-	.word MC_put_o_16_arm_align1
+-	.word MC_put_o_16_arm_align2
+-	.word MC_put_o_16_arm_align3
+ 
+ @ ----------------------------------------------------------------
+ 	.align
+@@ -91,9 +90,14 @@ MC_put_o_8_arm:
+ 	pld [r1]
+         stmfd sp!, {r4-r10, lr} @ R14 is also called LR
+ 	and r4, r1, #3
+-	adr r5, MC_put_o_8_arm_align_jt
+-	add r5, r5, r4, lsl #2
+-	ldr pc, [r5]
++	ldrb r4, [pc, r4]
++	add pc, pc, r4, lsl #2
++	.byte (MC_put_o_8_arm_align0 - 0f)>>2
++	.byte (MC_put_o_8_arm_align1 - 0f)>>2
++	.byte (MC_put_o_8_arm_align2 - 0f)>>2
++	.byte (MC_put_o_8_arm_align3 - 0f)>>2
++0:
++
+ MC_put_o_8_arm_align0:
+ 	ldmia r1, {r4-r5}
+ 	add r1, r1, r2
+@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3:
+ 	bne 1b
+         ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
+ 
+-MC_put_o_8_arm_align_jt:
+-	.word MC_put_o_8_arm_align0
+-	.word MC_put_o_8_arm_align1
+-	.word MC_put_o_8_arm_align2
+-	.word MC_put_o_8_arm_align3
+-
+ @ ----------------------------------------------------------------
+ .macro	AVG_PW rW1, rW2
+ 	mov \rW2, \rW2, lsl #24
+@@ -160,12 +158,17 @@ MC_put_x_16_arm:
+ 	@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ 	pld [r1]
+         stmfd sp!, {r4-r11,lr} @ R14 is also called LR
++	ldr r11, 0f
+ 	and r4, r1, #3
+-	adr r5, MC_put_x_16_arm_align_jt
+-	ldr r11, [r5]
+ 	mvn r12, r11
+-	add r5, r5, r4, lsl #2
+-	ldr pc, [r5, #4]
++	ldrb r4, [pc, r4]
++	add pc, pc, r4, lsl #2
++	.byte (MC_put_x_16_arm_align0 - 0f)>>2
++	.byte (MC_put_x_16_arm_align1 - 0f)>>2
++	.byte (MC_put_x_16_arm_align2 - 0f)>>2
++	.byte (MC_put_x_16_arm_align3 - 0f)>>2
++0:
++	  .word 0x01010101
+ 
+ .macro	ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
+ 	mov \R0, \R0, lsr #(\shift)
+@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3:
+ 	add r0, r0, r2
+ 	bne 1b
+         ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
+-MC_put_x_16_arm_align_jt:
+-	.word 0x01010101
+-	.word MC_put_x_16_arm_align0
+-	.word MC_put_x_16_arm_align1
+-	.word MC_put_x_16_arm_align2
+-	.word MC_put_x_16_arm_align3
+ 
+ @ ----------------------------------------------------------------
+ 	.align
+@@ -253,12 +250,17 @@ MC_put_x_8_arm:
+ 	@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
+ 	pld [r1]
+         stmfd sp!, {r4-r11,lr} @ R14 is also called LR
++	ldr r11, 0f
+ 	and r4, r1, #3
+-	adr r5, MC_put_x_8_arm_align_jt
+-	ldr r11, [r5]
+ 	mvn r12, r11
+-	add r5, r5, r4, lsl #2
+-	ldr pc, [r5, #4]
++	ldrb r4, [pc, r4]
++	add pc, pc, r4, lsl #2
++	.byte (MC_put_x_8_arm_align0 - 0f)>>2
++	.byte (MC_put_x_8_arm_align1 - 0f)>>2
++	.byte (MC_put_x_8_arm_align2 - 0f)>>2
++	.byte (MC_put_x_8_arm_align3 - 0f)>>2
++0:
++	  .word 0x01010101
+ 
+ .macro	ADJ_ALIGN_DW shift, R0, R1, R2
+ 	mov \R0, \R0, lsr #(\shift)
+@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3:
+ 	add r0, r0, r2
+ 	bne 1b
+         ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
+-MC_put_x_8_arm_align_jt:
+-	.word 0x01010101
+-	.word MC_put_x_8_arm_align0
+-	.word MC_put_x_8_arm_align1
+-	.word MC_put_x_8_arm_align2
+-	.word MC_put_x_8_arm_align3
diff --git a/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
index 6b59d4f..00ca367 100644
--- a/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
+++ b/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb
@@ -11,6 +11,7 @@
            file://0001-check-for-available-arm-optimizations.patch \
            file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \
            file://61_global-symbol-test.patch \
+           file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \
            "
 
 S = "${WORKDIR}/libmpeg2-${PV}"
diff --git a/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 9a95e7c..e245be7 100644
--- a/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -61,7 +61,7 @@
 DEPENDS += "udev alsa-lib glib-2.0"
 DEPENDS += "speexdsp libxml-parser-perl-native libcap"
 
-inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd manpages gsettings
+inherit autotools bash-completion pkgconfig useradd gettext perlnative systemd manpages gsettings
 
 # *.desktop rules wont be generated during configure and build will fail
 # if using --disable-nls
@@ -98,7 +98,7 @@
 # very good anyway, better alternatives exist (such as the webrtc canceller).
 EXTRA_OECONF += "--disable-adrian-aec"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \
@@ -106,7 +106,6 @@
                    "
 
 PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc"
 PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc"
 PACKAGECONFIG[gconf] = "--enable-gconf,--disable-gconf,gconf"
 PACKAGECONFIG[gsettings] = "--enable-gsettings,--disable-gsettings,glib-2.0-native glib-2.0"
diff --git a/poky/meta/recipes-rt/rt-tests/rt-tests.inc b/poky/meta/recipes-rt/rt-tests/rt-tests.inc
index f87952e..84a8f67 100644
--- a/poky/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/poky/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -3,8 +3,8 @@
 PE = "1"
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git"
-# 1.2 and 1.3 seem to be development versions
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(?!1\.2)(?!1\.3)(\d+(\.\d+)+))"
+# 1.2 and 1.3 and 1.4 seem to be development versions
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(?!1\.2)(?!1\.3)(?!1\.4)(\d+(\.\d+)+))"
 
 S = "${WORKDIR}/git"
 
diff --git a/poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb b/poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
index e84beda..ff297fe 100644
--- a/poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
+++ b/poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
@@ -12,10 +12,10 @@
 
 # This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live
 # image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
-# box) and explicitly add just 1200MB.
+# box) and explicitly add just 1100MB.
 # strace-ptest in particular needs more than 500MB
 IMAGE_OVERHEAD_FACTOR = "1.0"
-IMAGE_ROOTFS_EXTRA_SPACE = "1224288"
+IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
 QB_MEM = "-m 1024"
diff --git a/poky/meta/recipes-sato/webkit/webkitgtk_2.24.2.bb b/poky/meta/recipes-sato/webkit/webkitgtk_2.24.2.bb
index 056334f..891266b 100644
--- a/poky/meta/recipes-sato/webkit/webkitgtk_2.24.2.bb
+++ b/poky/meta/recipes-sato/webkit/webkitgtk_2.24.2.bb
@@ -43,6 +43,8 @@
 	   gettext-native glib-2.0 glib-2.0-native libtasn1 \
           "
 
+COMPATIBLE_HOST_mipsarch = "${@bb.utils.contains('DEFAULTTUNE', 'mips', 'null', 'mips.*-linux', d)}"
+
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'webgl opengl', '' ,d)} \
                    enchant \
diff --git a/poky/meta/recipes-support/boost/boost.inc b/poky/meta/recipes-support/boost/boost.inc
index 9be3717..0330202 100644
--- a/poky/meta/recipes-support/boost/boost.inc
+++ b/poky/meta/recipes-support/boost/boost.inc
@@ -2,6 +2,8 @@
 SECTION = "libs"
 DEPENDS = "bjam-native zlib bzip2"
 
+CVE_PRODUCT = "boost:boost"
+
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
 
diff --git a/poky/meta/recipes-support/curl/curl_7.65.1.bb b/poky/meta/recipes-support/curl/curl_7.65.2.bb
similarity index 95%
rename from poky/meta/recipes-support/curl/curl_7.65.1.bb
rename to poky/meta/recipes-support/curl/curl_7.65.2.bb
index e7bfe6c..2fff044 100644
--- a/poky/meta/recipes-support/curl/curl_7.65.1.bb
+++ b/poky/meta/recipes-support/curl/curl_7.65.2.bb
@@ -9,8 +9,8 @@
            file://0001-replace-krb5-config-with-pkg-config.patch \
 "
 
-SRC_URI[md5sum] = "03ca3fa53ac4d791be66e30ba75b56ea"
-SRC_URI[sha256sum] = "cbd36df60c49e461011b4f3064cff1184bdc9969a55e9608bf5cadec4686e3f7"
+SRC_URI[md5sum] = "88910bdda3752a98083b6dbe85bafcaa"
+SRC_URI[sha256sum] = "8093398b51e7d8337dac6f8fa6f1f77d562bdd9eca679dff9d9c3b8160ebfd28"
 
 CVE_PRODUCT = "curl libcurl"
 inherit autotools pkgconfig binconfig multilib_header
diff --git a/poky/meta/recipes-support/debianutils/debianutils_4.8.6.1.bb b/poky/meta/recipes-support/debianutils/debianutils_4.8.6.3.bb
similarity index 86%
rename from poky/meta/recipes-support/debianutils/debianutils_4.8.6.1.bb
rename to poky/meta/recipes-support/debianutils/debianutils_4.8.6.3.bb
index 7cc78a6..a69d01e 100644
--- a/poky/meta/recipes-support/debianutils/debianutils_4.8.6.1.bb
+++ b/poky/meta/recipes-support/debianutils/debianutils_4.8.6.3.bb
@@ -3,15 +3,13 @@
 LICENSE = "GPLv2 & SMAIL_GPL"
 LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
 
-SRC_URI = "http://snapshot.debian.org/archive/debian/20190217T160716Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+SRC_URI = "http://snapshot.debian.org/archive/debian/20190717T213444Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
 # the package is taken from snapshots.debian.org; that source is static and goes stale
 # so we check the latest upstream from a directory that does get updated
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
 
-SRC_URI[md5sum] = "80e2e670d8f6c0036770e971237f1f5c"
-SRC_URI[sha256sum] = "099f1e8a7278b26145a2ba2dda84c4118403bfab38c8d7070a6235a7ffcb55ed"
-
-S = "${WORKDIR}/${BPN}"
+SRC_URI[md5sum] = "ca57cc6621275346d7d516ab0b5fa1f5"
+SRC_URI[sha256sum] = "2cc7de3afc6df1cf6d00af9938efac7ee8f739228e548e512ddc186b6a7be221"
 
 inherit autotools update-alternatives
 
diff --git a/poky/meta/recipes-support/gnupg/gnupg_2.2.16.bb b/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb
similarity index 92%
rename from poky/meta/recipes-support/gnupg/gnupg_2.2.16.bb
rename to poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb
index cb7c6c5..e5456dd 100644
--- a/poky/meta/recipes-support/gnupg/gnupg_2.2.16.bb
+++ b/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb
@@ -19,9 +19,8 @@
 SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
                                 file://relocate.patch"
 
-
-SRC_URI[md5sum] = "d90e186df1c06845880ea58a318f070b"
-SRC_URI[sha256sum] = "6cbe8d454bf5dc204621eed3016d721b66298fa95363395bb8eeceb1d2fd14cb"
+SRC_URI[md5sum] = "1ba2d9b70c377f8e967742064c27a19c"
+SRC_URI[sha256sum] = "afa262868e39b651a2db4c071fba90415154243e83a830ca00516f9a807fd514"
 
 EXTRA_OECONF = "--disable-ldap \
 		--disable-ccid-driver \
diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng b/poky/meta/recipes-support/libcap-ng/libcap-ng
deleted file mode 120000
index fb7744d..0000000
--- a/poky/meta/recipes-support/libcap-ng/libcap-ng
+++ /dev/null
@@ -1 +0,0 @@
-libcap-ng-python
\ No newline at end of file
diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb b/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb
index e49b445..43f76dc 100644
--- a/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb
+++ b/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb
@@ -1,5 +1,7 @@
 require libcap-ng.inc
 
+FILESEXTRAPATHS_prepend := "${THISDIR}/libcap-ng:"
+
 SUMMARY .= " - python"
 
 inherit lib_package autotools python3native
diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng-python/python.patch b/poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch
similarity index 100%
rename from poky/meta/recipes-support/libcap-ng/libcap-ng-python/python.patch
rename to poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch
diff --git a/poky/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch b/poky/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch
index 2331a76..c78d6fd 100644
--- a/poky/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch
+++ b/poky/meta/recipes-support/libpsl/libpsl/0001-gtk-doc-do-not-include-tree_index.sgml.patch
@@ -5,7 +5,7 @@
 
 gtk-doc 1.30 no longer generates the file if the object tree is empty
 
-Upstream-Status: Submitted [https://github.com/rockdaboot/libpsl/pull/137]
+Upstream-Status: Backport [87d1add318b5e5d09977f7f374e923577b6ff3be]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  docs/libpsl/libpsl-docs.sgml | 4 ----
diff --git a/poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch b/poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch
new file mode 100644
index 0000000..ef3f270
--- /dev/null
+++ b/poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch
@@ -0,0 +1,33 @@
+From c5eb6cf3aba0af048596106ed839b4ae17ecbcb1 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Sat, 27 Apr 2019 11:19:48 +0200
+Subject: [PATCH] Fix uninitialized read of xsl:number token
+
+Found by OSS-Fuzz.
+
+CVE: CVE-2019-13117
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxslt/commit/c5eb6cf3aba0af048596106ed839b4ae17ecbcb1]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ libxslt/numbers.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libxslt/numbers.c b/libxslt/numbers.c
+index 89e1f668..75c31eba 100644
+--- a/libxslt/numbers.c
++++ b/libxslt/numbers.c
+@@ -382,7 +382,10 @@ xsltNumberFormatTokenize(const xmlChar *format,
+ 		tokens->tokens[tokens->nTokens].token = val - 1;
+ 		ix += len;
+ 		val = xmlStringCurrentChar(NULL, format+ix, &len);
+-	    }
++	    } else {
++                tokens->tokens[tokens->nTokens].token = (xmlChar)'0';
++                tokens->tokens[tokens->nTokens].width = 1;
++            }
+ 	} else if ( (val == (xmlChar)'A') ||
+ 		    (val == (xmlChar)'a') ||
+ 		    (val == (xmlChar)'I') ||
+-- 
+2.21.0
+
diff --git a/poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch b/poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch
new file mode 100644
index 0000000..595e6c2
--- /dev/null
+++ b/poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch
@@ -0,0 +1,76 @@
+From 6ce8de69330783977dd14f6569419489875fb71b Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Mon, 3 Jun 2019 13:14:45 +0200
+Subject: [PATCH] Fix uninitialized read with UTF-8 grouping chars
+
+The character type in xsltFormatNumberConversion was too narrow and
+an invalid character/length combination could be passed to
+xsltNumberFormatDecimal, resulting in an uninitialized read.
+
+Found by OSS-Fuzz.
+
+CVE: CVE-2019-13118
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxslt/commit/6ce8de69330783977dd14f6569419489875fb71b]
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+---
+ libxslt/numbers.c         | 5 +++--
+ tests/docs/bug-222.xml    | 1 +
+ tests/general/bug-222.out | 2 ++
+ tests/general/bug-222.xsl | 6 ++++++
+ 4 files changed, 12 insertions(+), 2 deletions(-)
+ create mode 100644 tests/docs/bug-222.xml
+ create mode 100644 tests/general/bug-222.out
+ create mode 100644 tests/general/bug-222.xsl
+
+diff --git a/libxslt/numbers.c b/libxslt/numbers.c
+index f1ed8846..20b99d5a 100644
+--- a/libxslt/numbers.c
++++ b/libxslt/numbers.c
+@@ -1298,13 +1298,14 @@ OUTPUT_NUMBER:
+     number = floor((scale * number + 0.5)) / scale;
+     if ((self->grouping != NULL) &&
+         (self->grouping[0] != 0)) {
++        int gchar;
+ 
+ 	len = xmlStrlen(self->grouping);
+-	pchar = xsltGetUTF8Char(self->grouping, &len);
++	gchar = xsltGetUTF8Char(self->grouping, &len);
+ 	xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0],
+ 				format_info.integer_digits,
+ 				format_info.group,
+-				pchar, len);
++				gchar, len);
+     } else
+ 	xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0],
+ 				format_info.integer_digits,
+diff --git a/tests/docs/bug-222.xml b/tests/docs/bug-222.xml
+new file mode 100644
+index 00000000..69d62f2c
+--- /dev/null
++++ b/tests/docs/bug-222.xml
+@@ -0,0 +1 @@
++<doc/>
+diff --git a/tests/general/bug-222.out b/tests/general/bug-222.out
+new file mode 100644
+index 00000000..e3139698
+--- /dev/null
++++ b/tests/general/bug-222.out
+@@ -0,0 +1,2 @@
++<?xml version="1.0"?>
++1⠢0
+diff --git a/tests/general/bug-222.xsl b/tests/general/bug-222.xsl
+new file mode 100644
+index 00000000..e32dc473
+--- /dev/null
++++ b/tests/general/bug-222.xsl
+@@ -0,0 +1,6 @@
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
++  <xsl:decimal-format name="f" grouping-separator="⠢"/>
++  <xsl:template match="/">
++    <xsl:value-of select="format-number(10,'#⠢0','f')"/>
++  </xsl:template>
++</xsl:stylesheet>
+-- 
+2.21.0
+
diff --git a/poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb b/poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb
index 6320a82..abc00a0 100644
--- a/poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb
+++ b/poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb
@@ -10,6 +10,8 @@
 
 SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz \
            file://0001-Fix-security-framework-bypass.patch \
+           file://CVE-2019-13117.patch \
+           file://CVE-2019-13118.patch \
 "
 
 SRC_URI[md5sum] = "b3bd254a03e46d58f8ad1e4559cd2c2f"
diff --git a/poky/meta/recipes-support/nss/nss_3.44.bb b/poky/meta/recipes-support/nss/nss_3.45.bb
similarity index 98%
rename from poky/meta/recipes-support/nss/nss_3.44.bb
rename to poky/meta/recipes-support/nss/nss_3.45.bb
index 4205d79..e89e7d6 100644
--- a/poky/meta/recipes-support/nss/nss_3.44.bb
+++ b/poky/meta/recipes-support/nss/nss_3.45.bb
@@ -33,8 +33,8 @@
            file://system-pkcs11.txt \
            "
 
-SRC_URI[md5sum] = "e9222b9573452b9f4e6ff4915d6407c2"
-SRC_URI[sha256sum] = "a5620e59b6eeedfd5a12c9298b50ad92e9898b223e214eb675e36f4ffb5b6aff"
+SRC_URI[md5sum] = "f1752d7223ee9d910d551e57264bafa8"
+SRC_URI[sha256sum] = "112f05223d1fde902c170966bfc6f011b24a838be16969b110ecf2bb7bc24e8b"
 
 UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
 UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch b/poky/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch
deleted file mode 100644
index 58cf3f9..0000000
--- a/poky/meta/recipes-support/rng-tools/rng-tools/fix-rngd-fail-to-stop.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-It fails to stop rngd. It just shows warnings when stop rngd such as by:
-
-$ systemctl stop rngd.service
-
-but stalls shutdown untill daemon rngd is killed.
-
-Backport patch to fix the issue.
-
-Upstream-Status: Backport [https://bugzilla.redhat.com/show_bug.cgi?id=1690364#c8]
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff --git a/rngd_jitter.c b/rngd_jitter.c
-index 54070ae..7a69bf9 100644
---- a/rngd_jitter.c
-+++ b/rngd_jitter.c
-@@ -280,7 +280,7 @@ static void *thread_entropy_task(void *data)
- 
- 		/* Write to pipe */
- 		written = 0;
--		while(written != me->buf_sz) {
-+		while(me->active && written != me->buf_sz) {
- 			message(LOG_DAEMON|LOG_DEBUG, "Writing to pipe\n");
- 			ret = write(me->pipe_fd, &tmpbuf[written], me->buf_sz - written);
- 			message(LOG_DAEMON|LOG_DEBUG, "DONE Writing to pipe with return %ld\n", ret);
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service b/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service
index b1a7852..49d5de2 100644
--- a/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service
@@ -1,8 +1,5 @@
 [Unit]
 Description=Hardware RNG Entropy Gatherer Daemon
-DefaultDependencies=no
-After=systemd-udev-settle.service
-Before=sysinit.target
 
 [Service]
 EnvironmentFile=-@SYSCONFDIR@/default/rng-tools
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb b/poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb
index aeb558b..b4e453f 100644
--- a/poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb
+++ b/poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb
@@ -10,7 +10,6 @@
 
 SRC_URI = "\
     git://github.com/nhorman/rng-tools.git \
-    file://fix-rngd-fail-to-stop.patch \
     file://init \
     file://default \
     file://rngd.service \
@@ -46,8 +45,8 @@
     install -Dm 0644 ${WORKDIR}/rngd.service \
                      ${D}${systemd_system_unitdir}/rngd.service
     sed -i \
-        -e 's,@SYSCONFDIR@,${sysconfdir},' \
-        -e 's,@SBINDIR@,${sbindir},' \
+        -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+        -e 's,@SBINDIR@,${sbindir},g' \
         ${D}${sysconfdir}/init.d/rng-tools \
         ${D}${systemd_system_unitdir}/rngd.service
 }
diff --git a/poky/meta/recipes-support/sqlite/sqlite3_3.28.0.bb b/poky/meta/recipes-support/sqlite/sqlite3_3.28.0.bb
deleted file mode 100644
index 438a4ea..0000000
--- a/poky/meta/recipes-support/sqlite/sqlite3_3.28.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require sqlite3.inc
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
-
-SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz"
-SRC_URI[md5sum] = "3c68eb400f8354605736cd55400e1572"
-SRC_URI[sha256sum] = "d61b5286f062adfce5125eaf544d495300656908e61fca143517afcc0a89b7c3"
diff --git a/poky/meta/recipes-support/sqlite/sqlite3_3.29.0.bb b/poky/meta/recipes-support/sqlite/sqlite3_3.29.0.bb
new file mode 100644
index 0000000..07e36be
--- /dev/null
+++ b/poky/meta/recipes-support/sqlite/sqlite3_3.29.0.bb
@@ -0,0 +1,8 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
+
+SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz"
+SRC_URI[md5sum] = "8f3dfe83387e62ecb91c7c5c09c688dc"
+SRC_URI[sha256sum] = "8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b"
diff --git a/poky/meta/recipes-support/vte/vte_0.56.1.bb b/poky/meta/recipes-support/vte/vte_0.56.3.bb
similarity index 92%
rename from poky/meta/recipes-support/vte/vte_0.56.1.bb
rename to poky/meta/recipes-support/vte/vte_0.56.3.bb
index 702436b..0deee17 100644
--- a/poky/meta/recipes-support/vte/vte_0.56.1.bb
+++ b/poky/meta/recipes-support/vte/vte_0.56.3.bb
@@ -19,8 +19,8 @@
            file://0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch \
            file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
            "
-SRC_URI[archive.md5sum] = "a8984cd5a101dbff0b0c875d1de3f692"
-SRC_URI[archive.sha256sum] = "02fa8ecc02a9332e47f486795494527b5687b3bd448e73e6b67285f2f326dc7c"
+SRC_URI[archive.md5sum] = "adf341807861a5dad9f98e5c701c0769"
+SRC_URI[archive.sha256sum] = "17a1d4bc8848f1d2acfa4c20aaa24b9bac49f057b8909c56d3dafec2e2332648"
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
diff --git a/poky/scripts/buildstats-diff b/poky/scripts/buildstats-diff
index c179c93..2f6498a 100755
--- a/poky/scripts/buildstats-diff
+++ b/poky/scripts/buildstats-diff
@@ -114,7 +114,7 @@
             print(fmt_str.format(name, field1, field2, maxlen=maxlen))
 
 
-def print_task_diff(bs1, bs2, val_type, min_val=0, min_absdiff=0, sort_by=('absdiff',)):
+def print_task_diff(bs1, bs2, val_type, min_val=0, min_absdiff=0, sort_by=('absdiff',), only_tasks=[]):
     """Diff task execution times"""
     def val_to_str(val, human_readable=False):
         """Convert raw value to printable string"""
@@ -151,8 +151,9 @@
         """Get cumulative sum of all tasks"""
         total = 0.0
         for recipe_data in buildstats.values():
-            for bs_task in recipe_data.tasks.values():
-                total += getattr(bs_task, val_type)
+            for name, bs_task in recipe_data.tasks.items():
+                if not only_tasks or name in only_tasks:
+                    total += getattr(bs_task, val_type)
         return total
 
     if min_val:
@@ -163,7 +164,7 @@
                 val_to_str(min_absdiff, True), val_to_str(min_absdiff)))
 
     # Prepare the data
-    tasks_diff = diff_buildstats(bs1, bs2, val_type, min_val, min_absdiff)
+    tasks_diff = diff_buildstats(bs1, bs2, val_type, min_val, min_absdiff, only_tasks)
 
     # Sort our list
     for field in reversed(sort_by):
@@ -248,6 +249,8 @@
     parser.add_argument('--multi', action='store_true',
                         help="Read all buildstats from the given paths and "
                              "average over them")
+    parser.add_argument('--only-task', dest='only_tasks', metavar='TASK', action='append', default=[],
+                        help="Only include TASK in report. May be specified multiple times")
     parser.add_argument('buildstats1', metavar='BUILDSTATS1', help="'Left' buildstat")
     parser.add_argument('buildstats2', metavar='BUILDSTATS2', help="'Right' buildstat")
 
@@ -266,7 +269,6 @@
 
     return args
 
-
 def main(argv=None):
     """Script entry point"""
     args = parse_args(argv)
@@ -290,7 +292,7 @@
             print_ver_diff(bs1, bs2)
         else:
             print_task_diff(bs1, bs2, args.diff_attr, args.min_val,
-                            args.min_absdiff, sort_by)
+                            args.min_absdiff, sort_by, args.only_tasks)
     except ScriptError as err:
         log.error(str(err))
         return 1
diff --git a/poky/scripts/contrib/ddimage b/poky/scripts/contrib/ddimage
index b577d1c..7f2ad11 100755
--- a/poky/scripts/contrib/ddimage
+++ b/poky/scripts/contrib/ddimage
@@ -3,10 +3,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
 
-# Default to avoiding the first two disks on typical Linux and Mac OS installs
-# Better safe than sorry :-)
-BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/disk1 /dev/disk2"
-
 # 1MB blocksize
 BLOCKSIZE=1048576
 
@@ -32,7 +28,6 @@
 }
 
 device_details() {
-	DEV=$1
 	BLOCK_SIZE=512
 
 	echo "Device details"
@@ -45,11 +40,17 @@
 	fi
 
 	# Default / Linux information collection
-	echo "  device: $DEVICE"
+	ACTUAL_DEVICE=`readlink -f $DEVICE`
+	DEV=`basename $ACTUAL_DEVICE`
+	if [ "$ACTUAL_DEVICE" != "$DEVICE" ] ; then
+		echo "  device: $DEVICE -> $ACTUAL_DEVICE"
+	else
+		echo "  device: $DEVICE"
+	fi
 	if [ -f "/sys/class/block/$DEV/device/vendor" ]; then
 		echo "  vendor: $(cat /sys/class/block/$DEV/device/vendor)"
 	else
-		echo "  vendor: UNKOWN"
+		echo "  vendor: UNKNOWN"
 	fi
 	if [ -f "/sys/class/block/$DEV/device/model" ]; then
 		echo "   model: $(cat /sys/class/block/$DEV/device/model)"
@@ -64,6 +65,49 @@
 	echo ""
 }
 
+check_mount_device() {
+	if cat /proc/self/mounts | awk '{ print $1 }' | grep /dev/ | grep -q -E "^$1$" ; then
+		return 0
+	fi
+	return 1
+}
+
+is_mounted() {
+	if [ "$(uname)" = "Darwin" ]; then
+		if df | awk '{ print $1 }' | grep /dev/ | grep -q -E "^$1(s[0-9]+)?$" ; then
+			return 0
+		fi
+	else
+		if check_mount_device $1 ; then
+			return 0
+		fi
+		DEV=`basename $1`
+		if [ -d /sys/class/block/$DEV/ ] ; then
+			PARENT_BLKDEV=`basename $(readlink -f "/sys/class/block/$DEV/..")`
+			if [ "$PARENT_BLKDEV" != "block" ] ; then
+				if check_mount_device $PARENT_BLKDEV ; then
+					return 0
+				fi
+			fi
+			for CHILD_BLKDEV in `find /sys/class/block/$DEV/ -mindepth  1 -maxdepth 1 -name "$DEV*" -type d`
+			do
+				if check_mount_device /dev/`basename $CHILD_BLKDEV` ; then
+					return 0
+				fi
+			done
+		fi
+	fi
+	return 1
+}
+
+is_inuse() {
+	HOLDERS_DIR="/sys/class/block/`basename $1`/holders"
+	if [ -d $HOLDERS_DIR ] && [ `ls -A $HOLDERS_DIR` ] ; then
+		return 0
+	fi
+	return 1
+}
+
 if [ $# -ne 2 ]; then
 	usage
 	exit 1
@@ -78,22 +122,37 @@
 	exit 1
 fi
 
+if [ ! -e "$DEVICE" ]; then
+	echo "ERROR: Device $DEVICE does not exist"
+	usage
+	exit 1
+fi
 
-for i in ${BLACKLIST_DEVICES}; do
-	if [ "$i" = "$DEVICE" ]; then
-		echo "ERROR: Device $DEVICE is blacklisted"
-		exit 1
-	fi
-done
+if [ "$(uname)" = "Darwin" ]; then
+	# readlink doesn't support -f on MacOS, just assume it isn't a symlink
+	ACTUAL_DEVICE=$DEVICE
+else
+	ACTUAL_DEVICE=`readlink -f $DEVICE`
+fi
+if is_mounted $ACTUAL_DEVICE ; then
+	echo "ERROR: Device $DEVICE is currently mounted - check if this is the right device, and unmount it first if so"
+	device_details
+	exit 1
+fi
+if is_inuse $ACTUAL_DEVICE ; then
+	echo "ERROR: Device $DEVICE is currently in use (possibly part of LVM) - check if this is the right device!"
+	device_details
+	exit 1
+fi
 
 if [ ! -w "$DEVICE" ]; then
-	echo "ERROR: Device $DEVICE does not exist or is not writable"
+	echo "ERROR: Device $DEVICE is not writable - possibly use sudo?"
 	usage
 	exit 1
 fi
 
 image_details $IMAGE
-device_details $(basename $DEVICE)
+device_details
 
 printf "Write $IMAGE to $DEVICE [y/N]? "
 read RESPONSE
diff --git a/poky/scripts/contrib/list-packageconfig-flags.py b/poky/scripts/contrib/list-packageconfig-flags.py
index b1d6c85..d6de4dc 100755
--- a/poky/scripts/contrib/list-packageconfig-flags.py
+++ b/poky/scripts/contrib/list-packageconfig-flags.py
@@ -65,7 +65,7 @@
     for fn in data_dict:
         pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG")
         pkgconfigflags.pop('doc', None)
-        pkgname = data_dict[fn].getVar("P")
+        pkgname = data_dict[fn].getVar("PN")
         pkg_dict[pkgname] = sorted(pkgconfigflags.keys())
 
     return pkg_dict
diff --git a/poky/scripts/lib/buildstats.py b/poky/scripts/lib/buildstats.py
index 1adab06..c69b5bf 100644
--- a/poky/scripts/lib/buildstats.py
+++ b/poky/scripts/lib/buildstats.py
@@ -261,13 +261,17 @@
             self[pkg].aggregate(data)
 
 
-def diff_buildstats(bs1, bs2, stat_attr, min_val=None, min_absdiff=None):
+def diff_buildstats(bs1, bs2, stat_attr, min_val=None, min_absdiff=None, only_tasks=[]):
     """Compare the tasks of two buildstats"""
     tasks_diff = []
     pkgs = set(bs1.keys()).union(set(bs2.keys()))
     for pkg in pkgs:
         tasks1 = bs1[pkg].tasks if pkg in bs1 else {}
         tasks2 = bs2[pkg].tasks if pkg in bs2 else {}
+        if only_tasks:
+            tasks1 = {k: v for k, v in tasks1.items() if k in only_tasks}
+            tasks2 = {k: v for k, v in tasks2.items() if k in only_tasks}
+
         if not tasks1:
             pkg_op = '+'
         elif not tasks2:
diff --git a/poky/scripts/lib/devtool/menuconfig.py b/poky/scripts/lib/devtool/menuconfig.py
new file mode 100644
index 0000000..95384c5
--- /dev/null
+++ b/poky/scripts/lib/devtool/menuconfig.py
@@ -0,0 +1,79 @@
+# OpenEmbedded Development tool - menuconfig command plugin
+#
+# Copyright (C) 2018 Xilinx
+# Written by: Chandana Kalluri <ckalluri@xilinx.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+"""Devtool menuconfig plugin"""
+
+import os
+import bb
+import logging
+import argparse
+import re
+import glob
+from devtool import setup_tinfoil, parse_recipe, DevtoolError, standard, exec_build_env_command
+from devtool import check_workspace_recipe
+logger = logging.getLogger('devtool')
+
+def menuconfig(args, config, basepath, workspace):
+    """Entry point for the devtool 'menuconfig' subcommand"""
+
+    rd = ""
+    kconfigpath = ""
+    pn_src = ""
+    localfilesdir = ""
+    workspace_dir = ""
+    tinfoil = setup_tinfoil(basepath=basepath)
+    try:
+        rd = parse_recipe(config, tinfoil, args.component, appends=True, filter_workspace=False)
+        if not rd:
+            return 1
+
+        check_workspace_recipe(workspace, args.component)
+        pn = rd.getVar('PN', True)
+
+        if not rd.getVarFlag('do_menuconfig','task'):
+            raise DevtoolError("This recipe does not support menuconfig option")
+
+        workspace_dir = os.path.join(config.workspace_path,'sources')
+        kconfigpath = rd.getVar('B')
+        pn_src = os.path.join(workspace_dir,pn)
+
+        # add check to see if oe_local_files exists or not
+        localfilesdir = os.path.join(pn_src,'oe-local-files')
+        if not os.path.exists(localfilesdir):
+            bb.utils.mkdirhier(localfilesdir)
+            # Add gitignore to ensure source tree is clean
+            gitignorefile = os.path.join(localfilesdir,'.gitignore')
+            with open(gitignorefile, 'w') as f:
+                f.write('# Ignore local files, by default. Remove this file if you want to commit the directory to Git\n')
+                f.write('*\n')
+
+    finally:
+        tinfoil.shutdown()
+
+    logger.info('Launching menuconfig')
+    exec_build_env_command(config.init_path, basepath, 'bitbake -c menuconfig %s' % pn, watch=True)
+    fragment = os.path.join(localfilesdir, 'devtool-fragment.cfg')
+    res = standard._create_kconfig_diff(pn_src,rd,fragment)
+
+    return 0
+
+def register_commands(subparsers, context):
+    """register devtool subcommands from this plugin"""
+    parser_menuconfig = subparsers.add_parser('menuconfig',help='Alter build-time configuration for a recipe', description='Launches the make menuconfig command (for recipes where do_menuconfig is available), allowing users to make changes to the build-time configuration. Creates a config fragment corresponding to changes made.', group='advanced')
+    parser_menuconfig.add_argument('component', help='compenent to alter config')
+    parser_menuconfig.set_defaults(func=menuconfig,fixed_setup=context.fixed_setup)
diff --git a/poky/scripts/lib/devtool/standard.py b/poky/scripts/lib/devtool/standard.py
index aca74b1..96af488 100644
--- a/poky/scripts/lib/devtool/standard.py
+++ b/poky/scripts/lib/devtool/standard.py
@@ -461,11 +461,37 @@
     finally:
         tinfoil.shutdown()
 
+def symlink_oelocal_files_srctree(rd,srctree):
+    import oe.patch
+    if os.path.abspath(rd.getVar('S')) == os.path.abspath(rd.getVar('WORKDIR')):
+        # If recipe extracts to ${WORKDIR}, symlink the files into the srctree
+        # (otherwise the recipe won't build as expected)
+        local_files_dir = os.path.join(srctree, 'oe-local-files')
+        addfiles = []
+        for root, _, files in os.walk(local_files_dir):
+            relpth = os.path.relpath(root, local_files_dir)
+            if relpth != '.':
+                bb.utils.mkdirhier(os.path.join(srctree, relpth))
+            for fn in files:
+                if fn == '.gitignore':
+                    continue
+                destpth = os.path.join(srctree, relpth, fn)
+                if os.path.exists(destpth):
+                    os.unlink(destpth)
+                os.symlink('oe-local-files/%s' % fn, destpth)
+                addfiles.append(os.path.join(relpth, fn))
+        if addfiles:
+            bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
+        useroptions = []
+        oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=rd)
+        bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
+
 
 def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, workspace, fixed_setup, d, tinfoil, no_overrides=False):
     """Extract sources of a recipe"""
     import oe.recipeutils
     import oe.patch
+    import oe.path
 
     pn = d.getVar('PN')
 
@@ -562,7 +588,7 @@
         with open(preservestampfile, 'w') as f:
             f.write(d.getVar('STAMP'))
         try:
-            if bb.data.inherits_class('kernel-yocto', d):
+            if is_kernel_yocto:
                 # We need to generate the kernel config
                 task = 'do_configure'
             else:
@@ -589,6 +615,23 @@
             raise DevtoolError('Something went wrong with source extraction - the devtool-source class was not active or did not function correctly:\n%s' % str(e))
         srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir'))
 
+        # Check if work-shared is empty, if yes
+        # find source and copy to work-shared
+        if is_kernel_yocto:
+            workshareddir = d.getVar('STAGING_KERNEL_DIR')
+            staging_kerVer = get_staging_kver(workshareddir)
+            kernelVersion = d.getVar('LINUX_VERSION')
+
+            # handle dangling symbolic link in work-shared:
+            if os.path.islink(workshareddir):
+                os.unlink(workshareddir)
+
+            if os.path.exists(workshareddir) and (not os.listdir(workshareddir) or kernelVersion != staging_kerVer):
+                shutil.rmtree(workshareddir)
+                oe.path.copyhardlinktree(srcsubdir,workshareddir)
+            elif not os.path.exists(workshareddir):
+                oe.path.copyhardlinktree(srcsubdir,workshareddir)
+
         tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
         srctree_localdir = os.path.join(srctree, 'oe-local-files')
 
@@ -617,29 +660,7 @@
                 shutil.move(tempdir_localdir, srcsubdir)
 
             shutil.move(srcsubdir, srctree)
-
-            if os.path.abspath(d.getVar('S')) == os.path.abspath(d.getVar('WORKDIR')):
-                # If recipe extracts to ${WORKDIR}, symlink the files into the srctree
-                # (otherwise the recipe won't build as expected)
-                local_files_dir = os.path.join(srctree, 'oe-local-files')
-                addfiles = []
-                for root, _, files in os.walk(local_files_dir):
-                    relpth = os.path.relpath(root, local_files_dir)
-                    if relpth != '.':
-                        bb.utils.mkdirhier(os.path.join(srctree, relpth))
-                    for fn in files:
-                        if fn == '.gitignore':
-                            continue
-                        destpth = os.path.join(srctree, relpth, fn)
-                        if os.path.exists(destpth):
-                            os.unlink(destpth)
-                        os.symlink('oe-local-files/%s' % fn, destpth)
-                        addfiles.append(os.path.join(relpth, fn))
-                if addfiles:
-                    bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
-                useroptions = []
-                oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
-                bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
+            symlink_oelocal_files_srctree(d,srctree)
 
         if is_kernel_yocto:
             logger.info('Copying kernel config to srctree')
@@ -707,11 +728,31 @@
                     tf.write(line)
     os.rename(newfile, origfile)
 
+def get_staging_kver(srcdir):
+    # Kernel version from work-shared
+    kerver = []
+    staging_kerVer=""
+    if os.path.exists(srcdir) and os.listdir(srcdir):
+        with open(os.path.join(srcdir,"Makefile")) as f:
+            version = [next(f) for x in range(5)][1:4]
+            for word in version:
+                kerver.append(word.split('= ')[1].split('\n')[0])
+            staging_kerVer = ".".join(kerver)
+    return staging_kerVer
+
+def get_staging_kbranch(srcdir):
+    staging_kbranch = ""
+    if os.path.exists(srcdir) and os.listdir(srcdir):
+        (branch, _) = bb.process.run('git branch | grep \* | cut -d \' \' -f2', cwd=srcdir)
+        staging_kbranch = "".join(branch.split('\n')[0])
+    return staging_kbranch
+
 def modify(args, config, basepath, workspace):
     """Entry point for the devtool 'modify' subcommand"""
     import bb
     import oe.recipeutils
     import oe.patch
+    import oe.path
 
     if args.recipename in workspace:
         raise DevtoolError("recipe %s is already in your workspace" %
@@ -753,6 +794,59 @@
         initial_rev = None
         commits = []
         check_commits = False
+
+        if bb.data.inherits_class('kernel-yocto', rd):
+            # Current set kernel version
+            kernelVersion = rd.getVar('LINUX_VERSION')
+            srcdir = rd.getVar('STAGING_KERNEL_DIR')
+            kbranch = rd.getVar('KBRANCH')
+
+            staging_kerVer = get_staging_kver(srcdir)
+            staging_kbranch = get_staging_kbranch(srcdir)
+            if (os.path.exists(srcdir) and os.listdir(srcdir)) and (kernelVersion in staging_kerVer and staging_kbranch == kbranch):
+                oe.path.copyhardlinktree(srcdir,srctree)
+                workdir = rd.getVar('WORKDIR')
+                srcsubdir = rd.getVar('S')
+                localfilesdir = os.path.join(srctree,'oe-local-files')
+                # Move local source files into separate subdir
+                recipe_patches = [os.path.basename(patch) for patch in oe.recipeutils.get_recipe_patches(rd)]
+                local_files = oe.recipeutils.get_recipe_local_files(rd)
+
+                for key in local_files.copy():
+                    if key.endswith('scc'):
+                        sccfile = open(local_files[key], 'r')
+                        for l in sccfile:
+                            line = l.split()
+                            if line and line[0] in ('kconf', 'patch'):
+                                cfg = os.path.join(os.path.dirname(local_files[key]), line[-1])
+                                if not cfg in local_files.values():
+                                    local_files[line[-1]] = cfg
+                                    shutil.copy2(cfg, workdir)
+                        sccfile.close()
+
+                # Ignore local files with subdir={BP}
+                srcabspath = os.path.abspath(srcsubdir)
+                local_files = [fname for fname in local_files if os.path.exists(os.path.join(workdir, fname)) and  (srcabspath == workdir or not  os.path.join(workdir, fname).startswith(srcabspath + os.sep))]
+                if local_files:
+                    for fname in local_files:
+                        _move_file(os.path.join(workdir, fname), os.path.join(srctree, 'oe-local-files', fname))
+                    with open(os.path.join(srctree, 'oe-local-files', '.gitignore'), 'w') as f:
+                        f.write('# Ignore local files, by default. Remove this file ''if you want to commit the directory to Git\n*\n')
+
+                symlink_oelocal_files_srctree(rd,srctree)
+
+                task = 'do_configure'
+                res = tinfoil.build_targets(pn, task, handle_events=True)
+
+                # Copy .config to workspace
+                kconfpath = rd.getVar('B')
+                logger.info('Copying kernel config to workspace')
+                shutil.copy2(os.path.join(kconfpath, '.config'),srctree)
+
+                # Set this to true, we still need to get initial_rev
+                # by parsing the git repo
+                args.no_extract = True
+
         if not args.no_extract:
             initial_rev, _ = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
             if not initial_rev:
@@ -844,6 +938,11 @@
                         '    cp ${B}/.config ${S}/.config.baseline\n'
                         '    ln -sfT ${B}/.config ${S}/.config.new\n'
                         '}\n')
+            if rd.getVarFlag('do_menuconfig','task'):
+                f.write('\ndo_configure_append() {\n'
+                '    cp ${B}/.config ${S}/.config.baseline\n'
+                '    ln -sfT ${B}/.config ${S}/.config.new\n'
+                '}\n')
             if initial_rev:
                 f.write('\n# initial_rev: %s\n' % initial_rev)
                 for commit in commits:
@@ -1866,13 +1965,27 @@
 def _get_layer(layername, d):
     """Determine the base layer path for the specified layer name/path"""
     layerdirs = d.getVar('BBLAYERS').split()
-    layers = {os.path.basename(p): p for p in layerdirs}
+    layers = {}    # {basename: layer_paths}
+    for p in layerdirs:
+        bn = os.path.basename(p)
+        if bn not in layers:
+            layers[bn] = [p]
+        else:
+            layers[bn].append(p)
     # Provide some shortcuts
     if layername.lower() in ['oe-core', 'openembedded-core']:
-        layerdir = layers.get('meta', None)
+        layername = 'meta'
+    layer_paths = layers.get(layername, None)
+    if not layer_paths:
+        return os.path.abspath(layername)
+    elif len(layer_paths) == 1:
+        return os.path.abspath(layer_paths[0])
     else:
-        layerdir = layers.get(layername, None)
-    return os.path.abspath(layerdir or layername)
+        # multiple layers having the same base name
+        logger.warning("Multiple layers have the same base name '%s', use the first one '%s'." % (layername, layer_paths[0]))
+        logger.warning("Consider using path instead of base name to specify layer:\n\t\t%s" % '\n\t\t'.join(layer_paths))
+        return os.path.abspath(layer_paths[0])
+
 
 def finish(args, config, basepath, workspace):
     """Entry point for the devtool 'finish' subcommand"""
diff --git a/poky/scripts/lib/devtool/upgrade.py b/poky/scripts/lib/devtool/upgrade.py
index 62ec2f9..18c5b66 100644
--- a/poky/scripts/lib/devtool/upgrade.py
+++ b/poky/scripts/lib/devtool/upgrade.py
@@ -122,18 +122,22 @@
     rfp = os.path.split(rf)[0] # recipe folder
     rfpp = os.path.split(rfp)[0] # recipes folder
     if os.path.exists(rfp):
-        shutil.rmtree(b)
+        shutil.rmtree(rfp)
     if not len(os.listdir(rfpp)):
         os.rmdir(rfpp)
     srctree = os.path.abspath(srctree)
     if os.path.exists(srctree):
         shutil.rmtree(srctree)
 
-def _upgrade_error(e, rf, srctree):
-    if rf:
-        cleanup_on_error(rf, srctree)
+def _upgrade_error(e, rf, srctree, keep_failure=False, extramsg=None):
+    if rf and not keep_failure:
+        _cleanup_on_error(rf, srctree)
     logger.error(e)
-    raise DevtoolError(e)
+    if extramsg:
+        logger.error(extramsg)
+    if keep_failure:
+        logger.info('Preserving failed upgrade files (--keep-failure)')
+    sys.exit(1)
 
 def _get_uri(rd):
     srcuris = rd.getVar('SRC_URI').split()
@@ -277,6 +281,7 @@
             logger.info('Preserving temporary directory %s' % tmpsrctree)
         else:
             shutil.rmtree(tmpsrctree)
+            shutil.rmtree(tmpdir)
 
     return (rev, md5, sha256, srcbranch, srcsubdir_rel)
 
@@ -299,7 +304,7 @@
         f.write("\n#\n\n".encode())
         f.write(orig_content)
 
-def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, srcsubdir_new, workspace, tinfoil, rd, license_diff, new_licenses):
+def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, srcsubdir_new, workspace, tinfoil, rd, license_diff, new_licenses, srctree, keep_failure):
     """Creates the new recipe under workspace"""
 
     bpn = rd.getVar('BPN')
@@ -416,7 +421,10 @@
         newvalues["LIC_FILES_CHKSUM"] = newlicchksum
         _add_license_diff_to_recipe(fullpath, license_diff)
 
-    rd = tinfoil.parse_recipe_file(fullpath, False)
+    try:
+        rd = tinfoil.parse_recipe_file(fullpath, False)
+    except bb.tinfoil.TinfoilCommandFailed as e:
+        _upgrade_error(e, fullpath, srctree, keep_failure, 'Parsing of upgraded recipe failed')
     oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
 
     return fullpath, copied
@@ -548,11 +556,11 @@
                                                     tinfoil, rd)
             new_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM'))
             license_diff = _generate_license_diff(old_licenses, new_licenses)
-            rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, srcsubdir1, srcsubdir2, config.workspace_path, tinfoil, rd, license_diff, new_licenses)
+            rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, srcsubdir1, srcsubdir2, config.workspace_path, tinfoil, rd, license_diff, new_licenses, srctree, args.keep_failure)
         except bb.process.CmdError as e:
-            _upgrade_error(e, rf, srctree)
+            _upgrade_error(e, rf, srctree, args.keep_failure)
         except DevtoolError as e:
-            _upgrade_error(e, rf, srctree)
+            _upgrade_error(e, rf, srctree, args.keep_failure)
         standard._add_md5(config, pn, os.path.dirname(rf))
 
         af = _write_append(rf, srctree, args.same_dir, args.no_same_dir, rev2,
@@ -623,6 +631,7 @@
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
     parser_upgrade.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
+    parser_upgrade.add_argument('--keep-failure', action="store_true", help='Keep failed upgrade recipe and associated files  (for debugging)')
     parser_upgrade.set_defaults(func=upgrade, fixed_setup=context.fixed_setup)
 
     parser_latest_version = subparsers.add_parser('latest-version', help='Report the latest version of an existing recipe',
diff --git a/poky/scripts/lib/recipetool/create.py b/poky/scripts/lib/recipetool/create.py
index 98277f7..1fb6b55 100644
--- a/poky/scripts/lib/recipetool/create.py
+++ b/poky/scripts/lib/recipetool/create.py
@@ -60,7 +60,9 @@
         if RecipeHandler.recipelibmap:
             return
         # First build up library->package mapping
-        shlib_providers = oe.package.read_shlib_providers(d)
+        d2 = bb.data.createCopy(d)
+        d2.setVar("WORKDIR_PKGDATA", "${PKGDATA_DIR}")
+        shlib_providers = oe.package.read_shlib_providers(d2)
         libdir = d.getVar('libdir')
         base_libdir = d.getVar('base_libdir')
         libpaths = list(set([base_libdir, libdir]))
@@ -1053,6 +1055,7 @@
     md5sums['3b83ef96387f14655fc854ddc3c6bd57'] = 'Apache-2.0'
     md5sums['385c55653886acac3821999a3ccd17b3'] = 'Artistic-1.0 | GPL-2.0' # some perl modules
     md5sums['54c7042be62e169199200bc6477f04d1'] = 'BSD-3-Clause'
+    md5sums['bfe1f75d606912a4111c90743d6c7325'] = 'MPL-1.1'
     return md5sums
 
 def crunch_license(licfile):
diff --git a/poky/scripts/lib/recipetool/create_buildsys_python.py b/poky/scripts/lib/recipetool/create_buildsys_python.py
index ac9bc92..adfa377 100644
--- a/poky/scripts/lib/recipetool/create_buildsys_python.py
+++ b/poky/scripts/lib/recipetool/create_buildsys_python.py
@@ -154,8 +154,13 @@
         if 'buildsystem' in handled:
             return False
 
-        if not RecipeHandler.checkfiles(srctree, ['setup.py']):
-            return
+        # Check for non-zero size setup.py files
+        setupfiles = RecipeHandler.checkfiles(srctree, ['setup.py'])
+        for fn in setupfiles:
+            if os.path.getsize(fn):
+                break
+        else:
+            return False
 
         # setup.py is always parsed to get at certain required information, such as
         # distutils vs setuptools
diff --git a/poky/scripts/lib/wic/__init__.py b/poky/scripts/lib/wic/__init__.py
index ba2d614..8556793 100644
--- a/poky/scripts/lib/wic/__init__.py
+++ b/poky/scripts/lib/wic/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/env python3
 #
 # Copyright (c) 2007 Red Hat, Inc.
 # Copyright (c) 2011 Intel, Inc.
diff --git a/poky/scripts/lib/wic/ksparser.py b/poky/scripts/lib/wic/ksparser.py
index 6204821..3e67003 100644
--- a/poky/scripts/lib/wic/ksparser.py
+++ b/poky/scripts/lib/wic/ksparser.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/env python3
 #
 # Copyright (c) 2016 Intel, Inc.
 #
diff --git a/poky/scripts/lib/wic/pluginbase.py b/poky/scripts/lib/wic/pluginbase.py
index bfb73ca..f74d643 100644
--- a/poky/scripts/lib/wic/pluginbase.py
+++ b/poky/scripts/lib/wic/pluginbase.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/env python3
 #
 # Copyright (c) 2011 Intel, Inc.
 #
diff --git a/poky/scripts/lib/wic/plugins/imager/direct.py b/poky/scripts/lib/wic/plugins/imager/direct.py
index 67addef..91fc5e7 100644
--- a/poky/scripts/lib/wic/plugins/imager/direct.py
+++ b/poky/scripts/lib/wic/plugins/imager/direct.py
@@ -49,7 +49,6 @@
 
         # parse possible 'rootfs=name' items
         self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' '))
-        self.replaced_rootfs_paths = {}
         self.bootimg_dir = bootimg_dir
         self.kernel_dir = kernel_dir
         self.native_sysroot = native_sysroot
@@ -59,6 +58,7 @@
         self.compressor = options.compressor
         self.bmap = options.bmap
         self.no_fstab_update = options.no_fstab_update
+        self.original_fstab = None
 
         self.name = "%s-%s" % (os.path.splitext(os.path.basename(wks_file))[0],
                                strftime("%Y%m%d%H%M"))
@@ -104,24 +104,13 @@
 
         with open(fstab_path) as fstab:
             fstab_lines = fstab.readlines()
+            self.original_fstab = fstab_lines.copy()
 
         if self._update_fstab(fstab_lines, self.parts):
-            # copy rootfs dir to workdir to update fstab
-            # as rootfs can be used by other tasks and can't be modified
-            new_pseudo = os.path.realpath(os.path.join(self.workdir, "pseudo"))
-            from_dir = os.path.join(os.path.join(image_rootfs, ".."), "pseudo")
-            from_dir = os.path.realpath(from_dir)
-            copyhardlinktree(from_dir, new_pseudo)
-            new_rootfs = os.path.realpath(os.path.join(self.workdir, "rootfs_copy"))
-            copyhardlinktree(image_rootfs, new_rootfs)
-            fstab_path = os.path.join(new_rootfs, 'etc/fstab')
-
-            os.unlink(fstab_path)
-
             with open(fstab_path, "w") as fstab:
                 fstab.writelines(fstab_lines)
-
-            return new_rootfs
+        else:
+            self.original_fstab = None
 
     def _update_fstab(self, fstab_lines, parts):
         """Assume partition order same as in wks"""
@@ -170,14 +159,8 @@
         filesystems from the artifacts directly and combine them into
         a partitioned image.
         """
-        if self.no_fstab_update:
-            new_rootfs = None
-        else:
-            new_rootfs = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
-        if new_rootfs:
-            # rootfs was copied to update fstab
-            self.replaced_rootfs_paths[new_rootfs] = self.rootfs_dir['ROOTFS_DIR']
-            self.rootfs_dir['ROOTFS_DIR'] = new_rootfs
+        if not self.no_fstab_update:
+            self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
         for part in self.parts:
             # get rootfs size from bitbake variable if it's not set in .ks file
@@ -253,8 +236,6 @@
             else:
                 suffix = '["%s"]:' % (part.mountpoint or part.label)
             rootdir = part.rootfs_dir
-            if rootdir in self.replaced_rootfs_paths:
-                rootdir = self.replaced_rootfs_paths[rootdir]
             msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), rootdir)
 
         msg += '  BOOTIMG_DIR:                  %s\n' % self.bootimg_dir
@@ -292,6 +273,12 @@
             if os.path.isfile(path):
                 shutil.move(path, os.path.join(self.outdir, fname))
 
+        #Restore original fstab
+        if self.original_fstab:
+            fstab_path = self.rootfs_dir.get("ROOTFS_DIR") + "/etc/fstab"
+            with open(fstab_path, "w") as fstab:
+                fstab.writelines(self.original_fstab)
+
         # remove work directory
         shutil.rmtree(self.workdir, ignore_errors=True)
 
diff --git a/poky/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py b/poky/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
new file mode 100644
index 0000000..5bd7390
--- /dev/null
+++ b/poky/scripts/lib/wic/plugins/source/bootimg-biosplusefi.py
@@ -0,0 +1,213 @@
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# DESCRIPTION
+# This implements the 'bootimg-biosplusefi' source plugin class for 'wic'
+#
+# AUTHORS
+# William Bourque <wbourque [at) gmail.com>
+
+import types
+
+from wic.pluginbase import SourcePlugin
+from importlib.machinery import SourceFileLoader
+
+class BootimgBiosPlusEFIPlugin(SourcePlugin):
+    """
+    Create MBR + EFI boot partition
+
+    This plugin creates a boot partition that contains both
+    legacy BIOS and EFI content. It will be able to boot from both.
+    This is useful when managing PC fleet with some older machines
+    without EFI support.
+
+    Note it is possible to create an image that can boot from both
+    legacy BIOS and EFI by defining two partitions : one with arg
+    --source bootimg-efi  and another one with --source bootimg-pcbios.
+    However, this method has the obvious downside that it requires TWO
+    partitions to be created on the storage device.
+    Both partitions will also be marked as "bootable" which does not work on
+    most BIOS, has BIOS often uses the "bootable" flag to determine
+    what to boot. If you have such a BIOS, you need to manually remove the
+    "bootable" flag from the EFI partition for the drive to be bootable.
+    Having two partitions also seems to confuse wic : the content of
+    the first partition will be duplicated into the second, even though it
+    will not be used at all.
+
+    Also, unlike "isoimage-isohybrid" that also does BIOS and EFI, this plugin
+    allows you to have more than only a single rootfs partitions and does
+    not turn the rootfs into an initramfs RAM image.
+
+    This plugin is made to put everything into a single /boot partition so it
+    does not have the limitations listed above.
+
+    The plugin is made so it does tries not to reimplement what's already
+    been done in other plugins; as such it imports "bootimg-pcbios"
+    and "bootimg-efi".
+    Plugin "bootimg-pcbios" is used to generate legacy BIOS boot.
+    Plugin "bootimg-efi" is used to generate the UEFI boot. Note that it
+    requires a --sourceparams argument to know which loader to use; refer
+    to "bootimg-efi" code/documentation for the list of loader.
+
+    Imports are handled with "SourceFileLoader" from importlib as it is
+    otherwise very difficult to import module that has hyphen "-" in their
+    filename.
+    The SourcePlugin() methods used in the plugins (do_install_disk,
+    do_configure_partition, do_prepare_partition) are then called on both,
+    beginning by "bootimg-efi".
+
+    Plugin options, such as "--sourceparams" can still be passed to a
+    plugin, as long they does not cause issue in the other plugin.
+
+    Example wic configuration:
+    part /boot --source bootimg-biosplusefi --sourceparams="loader=grub-efi"\\
+               --ondisk sda --label os_boot --active --align 1024 --use-uuid
+    """
+
+    name = 'bootimg-biosplusefi'
+
+    __PCBIOS_MODULE_NAME = "bootimg-pcbios"
+    __EFI_MODULE_NAME = "bootimg-efi"
+
+    __imgEFIObj = None
+    __imgBiosObj = None
+
+    @classmethod
+    def __init__(cls):
+        """
+        Constructor (init)
+        """
+
+        # XXX
+        # For some reasons, __init__ constructor is never called.
+        # Something to do with how pluginbase works?
+        cls.__instanciateSubClasses()
+
+    @classmethod
+    def __instanciateSubClasses(cls):
+        """
+
+        """
+
+        # Import bootimg-pcbios (class name "BootimgPcbiosPlugin")
+        modulePath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                  cls.__PCBIOS_MODULE_NAME + ".py")
+        loader = SourceFileLoader(cls.__PCBIOS_MODULE_NAME, modulePath)
+        mod = types.ModuleType(loader.name)
+        loader.exec_module(mod)
+        cls.__imgBiosObj = mod.BootimgPcbiosPlugin()
+
+        # Import bootimg-efi (class name "BootimgEFIPlugin")
+        modulePath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                  cls.__EFI_MODULE_NAME + ".py")
+        loader = SourceFileLoader(cls.__EFI_MODULE_NAME, modulePath)
+        mod = types.ModuleType(loader.name)
+        loader.exec_module(mod)
+        cls.__imgEFIObj = mod.BootimgEFIPlugin()
+
+    @classmethod
+    def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir,
+                        bootimg_dir, kernel_dir, native_sysroot):
+        """
+        Called after all partitions have been prepared and assembled into a
+        disk image.
+        """
+
+        if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+            cls.__instanciateSubClasses()
+
+        cls.__imgEFIObj.do_install_disk(
+            disk,
+            disk_name,
+            creator,
+            workdir,
+            oe_builddir,
+            bootimg_dir,
+            kernel_dir,
+            native_sysroot)
+
+        cls.__imgBiosObj.do_install_disk(
+            disk,
+            disk_name,
+            creator,
+            workdir,
+            oe_builddir,
+            bootimg_dir,
+            kernel_dir,
+            native_sysroot)
+
+    @classmethod
+    def do_configure_partition(cls, part, source_params, creator, cr_workdir,
+                               oe_builddir, bootimg_dir, kernel_dir,
+                               native_sysroot):
+        """
+        Called before do_prepare_partition()
+        """
+
+        if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+            cls.__instanciateSubClasses()
+
+        cls.__imgEFIObj.do_configure_partition(
+            part,
+            source_params,
+            creator,
+            cr_workdir,
+            oe_builddir,
+            bootimg_dir,
+            kernel_dir,
+            native_sysroot)
+
+        cls.__imgBiosObj.do_configure_partition(
+            part,
+            source_params,
+            creator,
+            cr_workdir,
+            oe_builddir,
+            bootimg_dir,
+            kernel_dir,
+            native_sysroot)
+
+    @classmethod
+    def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
+                             oe_builddir, bootimg_dir, kernel_dir,
+                             rootfs_dir, native_sysroot):
+        """
+        Called to do the actual content population for a partition i.e. it
+        'prepares' the partition to be incorporated into the image.
+        """
+
+        if ( (not cls.__imgEFIObj) or (not cls.__imgBiosObj) ):
+            cls.__instanciateSubClasses()
+
+        cls.__imgEFIObj.do_prepare_partition(
+            part,
+            source_params,
+            creator,
+            cr_workdir,
+            oe_builddir,
+            bootimg_dir,
+            kernel_dir,
+            rootfs_dir,
+            native_sysroot)
+
+        cls.__imgBiosObj.do_prepare_partition(
+            part,
+            source_params,
+            creator,
+            cr_workdir,
+            oe_builddir,
+            bootimg_dir,
+            kernel_dir,
+            rootfs_dir,
+            native_sysroot)
diff --git a/poky/scripts/lib/wic/plugins/source/bootimg-efi.py b/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
index 5cc5c8a..2cfdc10 100644
--- a/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/poky/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -74,8 +74,10 @@
             grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot")
 
             kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-            if not kernel:
-                kernel = "bzImage"
+            if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+                if get_bitbake_var("INITRAMFS_IMAGE"):
+                    kernel = "%s-%s.bin" % \
+                        (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
 
             label = source_params.get('label')
             label_conf = "root=%s" % creator.rootdev
@@ -154,8 +156,10 @@
         if not custom_cfg:
             # Create systemd-boot configuration using parameters from wks file
             kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-            if not kernel:
-                kernel = "bzImage"
+            if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+                if get_bitbake_var("INITRAMFS_IMAGE"):
+                    kernel = "%s-%s.bin" % \
+                        (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
 
             title = source_params.get('title')
 
@@ -225,8 +229,10 @@
         hdddir = "%s/hdd/boot" % cr_workdir
 
         kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-        if not kernel:
-            kernel = "bzImage"
+        if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+            if get_bitbake_var("INITRAMFS_IMAGE"):
+                kernel = "%s-%s.bin" % \
+                    (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
 
         install_cmd = "install -m 0644 %s/%s %s/%s" % \
             (staging_kernel_dir, kernel, hdddir, kernel)
diff --git a/poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 670d347..f2639e7 100644
--- a/poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -150,8 +150,10 @@
         hdddir = "%s/hdd/boot" % cr_workdir
 
         kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-        if not kernel:
-            kernel = "bzImage"
+        if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+            if get_bitbake_var("INITRAMFS_IMAGE"):
+                kernel = "%s-%s.bin" % \
+                    (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
 
         cmds = ("install -m 0644 %s/%s %s/vmlinuz" %
                 (staging_kernel_dir, kernel, hdddir),
diff --git a/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 74d6f14..24299c1 100644
--- a/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -71,8 +71,11 @@
         syslinux_conf += "LABEL boot\n"
 
         kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-        if not kernel:
-            kernel = "bzImage"
+        if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+            if get_bitbake_var("INITRAMFS_IMAGE"):
+                kernel = "%s-%s.bin" % \
+                    (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
+
         syslinux_conf += "KERNEL /" + kernel + "\n"
         syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \
                              % bootloader.append
@@ -117,8 +120,10 @@
             grubefi_conf += "menuentry 'boot'{\n"
 
             kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-            if not kernel:
-                kernel = "bzImage"
+            if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+                if get_bitbake_var("INITRAMFS_IMAGE"):
+                    kernel = "%s-%s.bin" % \
+                        (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
 
             grubefi_conf += "linux /%s rootwait %s\n" \
                             % (kernel, bootloader.append)
@@ -273,8 +278,10 @@
             os.remove("%s/initrd.cpio.gz" % cr_workdir)
 
         kernel = get_bitbake_var("KERNEL_IMAGETYPE")
-        if not kernel:
-            kernel = "bzImage"
+        if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1":
+            if get_bitbake_var("INITRAMFS_IMAGE"):
+                kernel = "%s-%s.bin" % \
+                    (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME"))
 
         install_cmd = "install -m 0644 %s/%s %s/%s" % \
                       (kernel_dir, kernel, isodir, kernel)
diff --git a/poky/scripts/postinst-intercepts/update_icon_cache b/poky/scripts/postinst-intercepts/update_gtk_icon_cache
similarity index 76%
rename from poky/scripts/postinst-intercepts/update_icon_cache
rename to poky/scripts/postinst-intercepts/update_gtk_icon_cache
index 212209a..99367a2 100644
--- a/poky/scripts/postinst-intercepts/update_icon_cache
+++ b/poky/scripts/postinst-intercepts/update_gtk_icon_cache
@@ -2,10 +2,11 @@
 #
 # SPDX-License-Identifier: MIT
 #
+# Post-install intercept for gtk-icon-cache.bbclass
 
 set -e
 
-# update native pixbuf loaders
+# Update native pixbuf loaders
 $STAGING_DIR_NATIVE/${libdir_native}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache
 
 for icondir in $D/usr/share/icons/*/ ; do
diff --git a/poky/scripts/tiny/ksum.py b/poky/scripts/tiny/ksum.py
index f38ae05..8f0e4c0 100755
--- a/poky/scripts/tiny/ksum.py
+++ b/poky/scripts/tiny/ksum.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (c) 2016, Intel Corporation.
 #
@@ -62,7 +62,7 @@
     return False
 
 def collect_object_files():
-    print "Collecting object files recursively from %s..." % os.getcwd()
+    print("Collecting object files recursively from %s..." % os.getcwd())
     for dirpath, dirs, files in os.walk(os.getcwd()):
         for filename in files:
             if is_ko_file(filename):
@@ -70,7 +70,7 @@
             elif is_vmlinux_file(filename):
                 global vmlinux_file
                 vmlinux_file = os.path.join(dirpath, filename)
-    print "Collecting object files [DONE]"
+    print("Collecting object files [DONE]")
 
 def add_ko_file(filename):
         p = Popen("size -t " + filename, shell=True, stdout=PIPE, stderr=PIPE)
@@ -78,9 +78,9 @@
         if len(output) > 2:
             sizes = output[-1].split()[0:4]
             if verbose:
-                print "     %10d %10d %10d %10d\t" % \
-                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])),
-                print "%s" % filename[len(os.getcwd()) + 1:]
+                print("     %10d %10d %10d %10d\t" % \
+                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])), end=' ')
+                print("%s" % filename[len(os.getcwd()) + 1:])
             global n_ko_files, ko_text, ko_data, ko_bss, ko_total
             ko_text += int(sizes[0])
             ko_data += int(sizes[1])
@@ -94,9 +94,9 @@
         if len(output) > 2:
             sizes = output[-1].split()[0:4]
             if verbose:
-                print "     %10d %10d %10d %10d\t" % \
-                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])),
-                print "%s" % vmlinux_file[len(os.getcwd()) + 1:]
+                print("     %10d %10d %10d %10d\t" % \
+                    (int(sizes[0]), int(sizes[1]), int(sizes[2]), int(sizes[3])), end=' ')
+                print("%s" % vmlinux_file[len(os.getcwd()) + 1:])
             global vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total
             vmlinux_text += int(sizes[0])
             vmlinux_data += int(sizes[1])
@@ -129,20 +129,20 @@
     sum_ko_files()
     get_vmlinux_totals()
 
-    print "\nTotals:"
-    print "\nvmlinux:"
-    print "    text\tdata\t\tbss\t\ttotal"
-    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
-        (vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total)
-    print "\nmodules (%d):" % n_ko_files
-    print "    text\tdata\t\tbss\t\ttotal"
-    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
-        (ko_text, ko_data, ko_bss, ko_total)
-    print "\nvmlinux + modules:"
-    print "    text\tdata\t\tbss\t\ttotal"
-    print "    %-10d\t%-10d\t%-10d\t%-10d" % \
+    print("\nTotals:")
+    print("\nvmlinux:")
+    print("    text\tdata\t\tbss\t\ttotal")
+    print("    %-10d\t%-10d\t%-10d\t%-10d" % \
+        (vmlinux_text, vmlinux_data, vmlinux_bss, vmlinux_total))
+    print("\nmodules (%d):" % n_ko_files)
+    print("    text\tdata\t\tbss\t\ttotal")
+    print("    %-10d\t%-10d\t%-10d\t%-10d" % \
+        (ko_text, ko_data, ko_bss, ko_total))
+    print("\nvmlinux + modules:")
+    print("    text\tdata\t\tbss\t\ttotal")
+    print("    %-10d\t%-10d\t%-10d\t%-10d" % \
         (vmlinux_text + ko_text, vmlinux_data + ko_data, \
-         vmlinux_bss + ko_bss, vmlinux_total + ko_total)
+         vmlinux_bss + ko_bss, vmlinux_total + ko_total))
 
 if __name__ == "__main__":
     try: